Re: Re: function calls before variable declarations does not give error in gcc?

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

 



Hi Oza,

You're running into a GNU extension to C89, and a standard part of C99.

$ gcc -pedantic -std=c99 -W -Wall -Wno-unused-variable c99.c

No error messages.

$ gcc -pedantic -std=c89 -W -Wall -Wno-unused-variable c99.c
c99.c: In function `main':
c99.c:11: warning: ISO C89 forbids mixed declarations and code

Error messages.

HTH,
--Eljay


[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