This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Missing warning message
- To: andy at xena dot eas dot asu dot edu (Andrew Vaught)
- Subject: Re: Missing warning message
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Mon, 12 Feb 2001 16:00:43 -0800 (PST)
- Cc: gcc at gcc dot gnu dot org
> 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).