Why does flowing off the end of a non-void function without returning a value not produce a compiler error?

C99 and C++ standards don’t require functions to return a value. The missing return statement in a value-returning function will be defined (to return 0) only in the main function. The rationale includes that checking if every code path returns a value is quite difficult, and a return value could be set with embedded assembler … Read more