News for hackers. Stuff that matters.
Re:Declaring C String Constants by a_t48 on Wednesday May 17, 2017 @02:21PM (#14361240)
Beyond this,

  &ptr
and

  &arr
are different types! The signature for

  bogus(arr, &arr)
is something like

  void bogus(const char* arg1, const char (*arg2)[12])
While they do point to the same data, it's pretty rare to actually want to declare a

  const char (*)[N]
as a function argument - template magic code excepted, you don't gain much over a

  char *
and it's not the same as a

  char**
The two lines do different things, so of course they will generate different code. What do you know, the one that actually lets you do useful things is a few bytes longer.

There are no comments on this comment yet.