Say you have a C code like this:
#include int main(){ printf("Hello, world!\\n"); printf("%d\\n", f()); } in
I compile with -Werror=return-type to prevent this. GCC will give an error if you don't return from a function (unless it's void return).
-Werror=return-type