Re: i think i found
On 03/10/2012 07:22 PM, pete wrote:
> Barry Schwarz wrote:
> Prior to C99, these words:
> ISO/IEC 9899: 1990
> 184.108.40.206 The return statement
> A function may have any number of return statements,
> with and without expressions.
> If a return statement without an expression is executed,
> and the value of the function call is used by the caller,
> the behavior is undefined.
> Reaching the } that terminates a function is
> equivalent to executing a return statement without an expression.
> suggest that the use of the above function was defined in C90,
> as long as the code didn't use the return value.
> Both C99 and n1570, only have this much to say on this matter:
> A function may have any number of return statements.
They didn't change that aspect of C in C99, they only changed the way it
6.9.1p12: "If the } that terminates a function is reached, and the value
of the function call is used by the caller, the behavior is undefined.".