This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Re: function calls before variable declarations does not giveerror in gcc?
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