...
If the expression that precedes the parenthesized argument list in a function call consists solely of an identifier, and if no declaration is visible for this identifier, the identifier is implicitly declared exactly as if, in the innermost block containing the function call, the declaration
extern int identifier();
appeared.
An implementation that conforms to C99 or later might not perform implicit function declarations.
If a function declaration is not visible at the point at which a call to the function is made, some compilers C90-compliant platforms assume an implicit declaration of
extern int func();
However, to conform with the C StandardC99, you must explicitly prototype every function before invoking it. An implementation that conforms to C99 or later may or may not perform implicit function declarations. But C99 does require the implementation to issue a diagnostic if it encounters an undeclared function being used.
This noncompliant example fails to prototype the foo()
function before invoking it in main()
:
...