Article View: gnu.gcc.bug
Article #1177void functions returning expressions (which are void functions)
From: Andy Newman
Date: Fri, 09 Oct 1992 05:59
Date: Fri, 09 Oct 1992 05:59
21 lines
944 bytes
944 bytes
gcc 2.2.2 under SunOS 4.1.1 (and 4.1.2) does not report any problems
with the following code...
void fred(void)
{
}
void joe(void)
{
return fred();
}
Section 3.6.6.4 of the ANSI standard states that void functions cannot
have return statements with expressions.
--
Andy Newman (andy@research.canon.oz.au)
"Giving money and power to governments is like giving whiskey and
car keys to teenage boys" - P.J.O'Rourke
Technical Details
Message-ID:
<BvuBB0.8IM@research.canon.oz.au>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!research.CAnon.oz.AU!andyShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!research.CAnon.oz.AU!andy From: andy@research.CAnon.oz.AU (Andy Newman) Subject: void functions returning expressions (which are void functions) Message-ID: <BvuBB0.8IM@research.canon.oz.au> Sender: gnulists@ai.mit.edu Organization: Canon Information Systems Research Australia Distribution: gnu Date: Fri, 9 Oct 1992 05:59:23 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 22