Yes, I would say: What that option mean to you/compiler ?
-Wstrict-prototypes (C and Objective-C only)
Warn if a function is declared or defined without specifying the argument types. (An old-style function definition is permitted
without a warning if preceded by a declaration that specifies the argument types.)
hmmm.. lets try to compile the same program which used in earlier topics.
[hchiramm@humbles-lap C-Pgm]$ gcc -Wall -Wstrict-prototypes -ansi -pedantic -c compile.c
compile.c:3:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int main ()
^
[hchiramm@humbles-lap C-Pgm]$
now change the program a bit by respecting the warning..
# include <stdio.h>
int main (int argc, char *argv[])
{
printf ("\n I was told to compile ");
return 0;
}
[hchiramm@humbles-lap C-Pgm]$
Recompile,
[hchiramm@humbles-lap C-Pgm]$ gcc -Wall -Wstrict-prototypes -ansi -pedantic -c compile.c
[hchiramm@humbles-lap C-Pgm]$
No Errors!! cool, but Is this option really required ?
depends.. find the answer .. but always good to have it in your compiler string..