function declaration needs to be add before the first call of the function.
A full declaration includes the return type and the number and type of the arguments. This is also called the function prototype.
So you are Missing function prototype.
Add function declaration as void m();
to the code.
Edit:
C program allow to use forward declaration
.
In your case void m();
represents forward declaration of a function and is the function's prototype. After processing this declaration, the compiler would allow the user to refer to the entity m
in the rest of the program.
Definition for a function must be provided somewhere (same file or other, where it would be responsibility of the linker to correctly match references to particular function in one or several object files with its definition, which must be unique, in another): (From wikipedia page)
That is why defining function after main work in your program.