[Bug c/11250] -pedantic accepts `char a[] = ("x");'
pere at hungry dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 28 09:15:00 GMT 2004
------- Additional Comments From pere at hungry dot com 2004-10-28 09:15 -------
The compiler on IA64/HP-UX (aCC: HP aC++/ANSI C B3910B A.05.50 [May 15 2003])
refuses to compile this code and gives this error message:
Error 271: "x.c", line 1 # Illegal initializer.
char a[] = ("x");
^^^^^
It would be good if GCC always gave a warning (or even an error) if this
code is illegal according to ANSI C, to warn people that this code will fail
to compile on other compilers.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11250
More information about the Gcc-bugs
mailing list