Missing warning message

Joe Buck jbuck@synopsys.COM
Mon Feb 12 16:03:00 GMT 2001


> While working on g95, we had an erroneous declaration that looked like:
> 
> char array[] = { "a", "b", "c" };
> 
> Compiling with '-Wall -pedantic' gave no warnings of any sort.



> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

It's also present in 2.95.2.
But it has been fixed in the current snapshots:

w.c:1: excess elements in char array initializer
w.c:1: (near initialization for `array')
w.c:1: excess elements in char array initializer
w.c:1: (near initialization for `array')

(you get the error without specifying any flags).



More information about the Gcc mailing list