This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/23365] Declaration within case statement produces syntax error


------- Additional Comments From price at ifa dot hawaii dot edu  2005-08-12 20:48 -------
Just noticed that 3.4.3 calls it a "parse error", but 3.2.3 calls it a "syntax
error":

price@mithrandir:/home/mithrandir/price/IP3/scripts/src/phase2>gcc -std=c99
test.c -o test
test.c: In function `main':
test.c:8: syntax error before "int"
test.c:9: `a' undeclared (first use in this function)
test.c:9: (Each undeclared identifier is reported only once
test.c:9: for each function it appears in.)
price@mithrandir:/home/mithrandir/price/IP3/scripts/src/phase2>gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-52)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23365


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]