I notice that while compiling with -stdc99 (which asserts flag_isoc99) that
the
compiler issues warnings by default when it detects that a function call
references
a function which has not been previously declared.
Although it is a useful warning, my copy of the C99 spec. seems to indicate
that
such a warning is optional.
My copy of the C99 standard (2nd edition, 1999-12-01)
Says the following in Annex I ("Common Warnings"):
--- begin quote ----
1 An implementation may generate warnings in many situations, none of which
are
specified as part of this International Standard. The following are a few of
the more
common situations.
[...]
� A function is called but no prototype has been supplied (6.5.2.2).
--- end quote ----
There appears to be no requirement for the compiler to issue a warning,
although
does seem to be permitted by the specification.
Also, this behavior is not reflected in the documentation,
http://gcc.gnu.org/onlinedocs/gcc-4.0.0/gcc/Warning-Options.html#Warning-Opt
ions
-Wimplicit-function-declaration
-Werror-implicit-function-declaration
Give a warning (or error) whenever a function is used before being declared.
The form -Wno-error-implicit-function-declaration is not supported. This
warning is enabled by -Wall (as a warning, not an error).
-Wimplicit
Same as -Wimplicit-int and -Wimplicit-function-declaration. This warning is
enabled by -Wall.
The documentaion is technically incorrect, because at the top of the page,
it
states:
"This manual lists only one of the two forms, whichever is not the
default.". However, for C99 the option is enabled by default