[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-devel
Subject:    Fwd: Re: Depending on C99 (Re: GtkBindingSignal changes)
From:       "ANDREW PAPROCKI, BLOOMBERG/ 731 LEXIN" <apaprocki () bloomberg ! net>
Date:       2006-01-06 15:20:22
Message-ID: 2960_5263_1136560822_950 () inet3-p057
[Download RAW message or body]

>within compound statements.  As an extension, GCC also allows this in
>C89 mode.  For example, you could do:

IMO, this is a GCC bug... from the man page:

(-std=)
         c89
         iso9899:1990
             ISO C90 (same as -ansi).

         gnu89
             Default, ISO C90 plus GNU extensions (including some
             C99 features).

I would expect that to only be enabled if using gnu89, but indeed mixed 
declarations and code do compile with -ansi or -std=c89. The only way to cause 
this to generate warnings AFAIK is -pedantic:

$ gcc -std=c89 -o g g.c
$ gcc -std=c89 -pedantic -o g g.c
g.c: In function `main':
g.c:8: warning: ISO C89 forbids mixed declarations and code

This could have changed in newer GCC versions, but this is with 3.3.4.

Andrew Paprocki
Bloomberg LP



_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic