Function with missing return value, behavior at runtime

It is Undefined behaviour as specified in the ISO C++ standard section 6.6.3:

Flowing off the end of a function is
equivalent to a return with no value;
this results in undefined behavior in
a value-returning function.

Leave a Comment