This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17096] New: gcc-3.4.1 allows statements before declarations
- From: "metze at samba dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2004 08:38:43 -0000
- Subject: [Bug c/17096] New: gcc-3.4.1 allows statements before declarations
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 3.4.1 (gcc 3.3.3 also) allows statements before declarations:
{
int i1;
printf("bla");
int i2;
}
even if I use -ansi (and -Wall -Wshadow -Werror-implicit-function-declaration
-Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings)
I got no warning
gcc 2.95.3 and other c compilers
fail to compile that code
--
Summary: gcc-3.4.1 allows statements before declarations
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: metze at samba dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17096