I have a c file that I can compile with no problem using GCC
like below:
gcc foo.c
however using the same file I am receiving error of
Functions defined within functions are an extension to the C language, implemented by gcc. This is enabled by default. If you make gcc a Standard C compiler, as with -ansi -pedantic
or -std=C99
or similar, it will also complain about nested function definitions:
x.c: In function ‘main’:
x.c:8:5: warning: ISO C forbids nested functions [-Wpedantic]
int nested(void)
^