This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/23365] Declaration within case statement produces syntax error
- From: "price at ifa dot hawaii dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Aug 2005 20:48:26 -0000
- Subject: [Bug c/23365] Declaration within case statement produces syntax error
- References: <20050812204245.23365.price@ifa.hawaii.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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