🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1126

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

#1126
From: Doug Gwyn
Date: Mon, 09 Apr 1990 04:50
8 lines
833 bytes
In article <261E9779.25257@paris.ics.uci.edu> rfg@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.
Technical Details
Message-ID: <12548@smoke.BRL.MIL>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn
References: <261E9779.25257@paris.ics.uci.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!adm!smoke!gwyn
From: gwyn@smoke.BRL.MIL (Doug Gwyn)
Newsgroups: comp.std.c
Subject: Re: Is "void f(int i) { return (void)i; }" legal?
Message-ID: <12548@smoke.BRL.MIL>
Date: 9 Apr 90 04:50:51 GMT
References: <261E9779.25257@paris.ics.uci.edu>
Reply-To: gwyn@brl.arpa (Doug Gwyn)
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 8