News for hackers. Stuff that matters.
Re:Massacring C Pointers (2018) by edflsafoiewq on Friday September 04, 2020 @10:52PM (#24381030)
It teaches declaration-mirrors-use

  char *a         => *a is a char
  char a[3]       => a[i] is a char
  char f(char)    => f(c) is a char
  char (*f)(char) => (*f)(c) is a char (short form: f(c))
Re:Massacring C Pointers (2018) by TomSwirly on Saturday September 05, 2020 @02:57AM (#24381830)
But that doesn't mean it's understandable!
Re:Massacring C Pointers (2018) by richardwhiuk on Saturday September 05, 2020 @07:07AM (#24382752)
With the minor problem that `a[3]` isn't valid.
Re:Massacring C Pointers (2018) by edflsafoiewq on Saturday September 05, 2020 @07:50AM (#24382913)
Depends how you use it (&a[3], sizeof(a[3])). But its type is still char.
Re:Massacring C Pointers (2018) by richardwhiuk on Monday September 14, 2020 @06:07PM (#24475693)
IIRC, both of those are undefined.
Re:Massacring C Pointers (2018) by edflsafoiewq on Monday September 21, 2020 @04:34AM (#24541069)
&a[3] is allowed, it's a one-past-the-end-of-the-array pointer. &a[4] would be UB (if it were evaluated).

sizeof(a[3]) is not evaluating a[3], so it also isn't UB.