#include <stdio.h> int main(void) { void foo(void); //... } void test(void) { foo(); }
Standard input is empty
prog.c: In function ‘test’:
prog.c:9:5: warning: implicit declaration of function ‘foo’ [-Wimplicit-function-declaration]
foo();
^~~
prog.c:4:10: note: previous declaration of ‘foo’ was here
void foo(void);
^~~
prog.c:9:5: error: incompatible implicit declaration of function ‘foo’
foo();
^~~
prog.c:4:10: note: previous implicit declaration of ‘foo’ was here
void foo(void);
^~~
Standard output is empty