News for hackers. Stuff that matters.
Re:GCC Non-bugs by andrewchambers on Sunday March 01, 2015 @05:13PM (#9129126)
Something I found yesterday:

static char * s = * &"hello";

This should not compile, clang refuses it, and it is not part of the C standard. GCC accepts it, but is it worth even submitting a bug report?

Re:GCC Non-bugs by plorkyeran on Sunday March 01, 2015 @05:43PM (#9129233)
Clang 3.5 compiles that for me without warnings even with -Weverything. String literals in C (but not C++) aren't const for legacy reasons despite not being modifiable.
Re:GCC Non-bugs by andrewchambers on Sunday March 01, 2015 @06:10PM (#9129332)
Sorry, I made a mistake. I think it is:

static char s[] = * &"foo";

The c standard says char array initializers are either a string, or a string surrounded by optional '{}' .

Re:GCC Non-bugs by plorkyeran on Sunday March 01, 2015 @06:22PM (#9129385)
-pedantic gives "warning: array initialized from parenthesized string constant" for that, so I'm guessing it's an unintended consequence of a nonstandard extension. Might be worth reporting since at the minimum the warning is wrong.