Question about syntax

Ian Lance Taylor iant@google.com
Sat Apr 7 00:58:00 GMT 2007


devel <dev001@pas-world.com> writes:

> I see that GCC do not warning something like this:
> 
> {
> x++;
> 
> char var[10];
> int hello;
> 
> if ()
> {
> }
> ...
> 
> }
> 
> or similar.
> 
> Why GCC do not advise about this?

Because it is permitted by the C99 standard.  GCC permits it in C90
mode as an extension.  In C90 mode you will get a warning if you use
-pedantic.

Ian



More information about the Gcc-help mailing list