Code:
[c_d@localhost C]$ gcc -Wall product.c
product.c: In function ‘func1’:
product.c:10: warning: implicit declaration of function ‘printf’
product.c:10: warning: incompatible implicit declaration of built-in function ‘printf’
[c_d@localhost C]$
Code:
[c_d@localhost C]$ gcc -pedantic product.c
product.c: In function ‘func1’:
product.c:4: warning: ISO C forbids nested functions
product.c:10: warning: incompatible implicit declaration of built-in function ‘printf’
[c_d@localhost C]$ ./a.out
x=3,y=4x=5,y=8x=3,y=4[c_d@localhost C]$
Code:
[c_d@localhost C]$ gcc -ansi product.c
product.c: In function ‘func1’:
product.c:10: warning: incompatible implicit declaration of built-in function ‘printf’
[c_d@localhost C]$
Code:
[c_d@localhost C]$ gcc -std='c99' product.c
product.c: In function ‘func1’:
product.c:10: warning: implicit declaration of function ‘printf’
product.c:10: warning: incompatible implicit declaration of built-in function ‘printf’
[c_d@localhost C]$
i know about that warning...but is a way to get things done...like goto...and programmers have the right to know every option that they have...be it good or bad
and this isnt really bad...maybe awkward and kinda confusing...but not really bad...
surprising that MS doesnot allow nested functions...oO