Re: Question about syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



devel <dev001@xxxxxxxxxxxxx> 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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux