public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17096] New: gcc-3.4.1 allows statements before declarations
@ 2004-08-19  8:38 metze at samba dot org
  2004-08-19  8:47 ` [Bug c/17096] " falk at debian dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: metze at samba dot org @ 2004-08-19  8:38 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-08-19  9:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-19  8:38 [Bug c/17096] New: gcc-3.4.1 allows statements before declarations metze at samba dot org
2004-08-19  8:47 ` [Bug c/17096] " falk at debian dot org
2004-08-19  8:51 ` jsm at polyomino dot org dot uk
2004-08-19  9:25 ` metze at samba dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).