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

Leif Andrew Rump andrew at ambush.dk
Sat Apr 14 00:14:58 AEST 1990


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; }

As Doug Gwyn (i think it was) correctly states is it illegal _but_
it is a bit puzzling at first to see that void * is legal but I sure
rather want that than char * as it was in malloc and other in the past

Leif Andrew Rump, AmbraSoft A/S, Stroedamvej 50, DK-2100 Copenhagen OE, Denmark
    UUCP: andrew at ambra.dk (Please note name change), phone: +45 39 27 11 77
    Currently at SAS (Scandinavian Airline Systems), phone: +45 32 32 22 79

 > > Read oe as: o <backspace> / (slash) and OE as O <backspace> / (slash) < <



More information about the Comp.std.c mailing list