This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c/5678: Returning a void in a void func doesn't get a warning
- From: rth at gcc dot gnu dot org
- To: ac131313 at redhat dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 23 Apr 2002 08:53:59 -0000
- Subject: Re: c/5678: Returning a void in a void func doesn't get a warning
- Reply-to: rth at gcc dot gnu dot org, ac131313 at redhat dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Returning a void in a void func doesn't get a warning
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue Apr 23 01:53:57 2002
State-Changed-Why:
It does fall into gcc feature category. Using -ansi -pedantic
does indeed give the warning you wanted.
As for the advantages... well, there aren't many any more. Once upon a time we only did tail recursion elimination on
return statements. One can also make up post-hoc arguments
concerning compatibility with c++, which explicitly allows
this stuff to make template use easier.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5678