http://flash-gordon.me.uk/ansi.c.txt
3.6.6.4 The return statement
Constraints
A return statement with an expression shall not appear in a
function whose return type is void .
Semantics
A return statement terminates execution of the current function and
returns control to its caller. A function may have any number of
return statements, with and without expressions.
If a return statement with an expression is executed, the value of
the expression is returned to the caller as the value of the function
call expression. If the expression has a type different from that of
the function in which it appears, it is converted as if it were
assigned to an object of that type.
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.
楼主不知道你的ANSI C是哪个版本的 |