gcc will also complain.
Code:
$ gcc -W -Wall -ansi -pedantic foo.c
foo.c:4: warning: return type defaults to `int'
foo.c: In function `main':
foo.c:12: warning: control reaches end of non-void function
> foo.c:4: warning: return type defaults to `int'
In times past, not saying what type something was was the same as saying int.
Nowadays, these "implicit types" are frowned on, and we say
int main
to be totally clear about it.
> foo.c:12: warning: control reaches end of non-void function
We should have said
return 0;
The warning is telling us that falling off the end of the function is going to return some kind of junk value.