Is "void f(int i) { return (void)i; }" legal?

Doug Gwyn gwyn at smoke.BRL.MIL
Mon Apr 9 14:50:51 AEST 1990


In article <261E9779.25257 at paris.ics.uci.edu> rfg at paris.ics.uci.edu (Ronald Guilmette) writes:
>For those who missed the subject line, I'd like to know if this is legal:
>	void f (int i) { return (void) i; }

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.



More information about the Comp.std.c mailing list