3 ms·
Isn't it common knowledge that c89 has implicit function declarations? Here the the relevant standard quote: If the expression that precedes the parenthe
by camel-cdr 3y ago
Isn't it common knowledge that c89 has implicit function declarations?
Here the the relevant standard quote:
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
- fanf2 3y agoRight. And in the example, the function definition does not match the implicit definition, so it is undefined behaviour. (The calling conventions may differ.)