ANSI X3.159-1989, section 3.6.6.4, lines 33-35 state:
“If a return statement without an expression is executed, and the value of the function call
In both C99 TC2 and C11 it is 6.9.1/12:
If the
}
that terminates a function is reached, and the value of the function call is used by the caller, the behavior is undefined.
In C++11 and C++14 it is [stmt.return]/2:
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