This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: missing return statement
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: Nathan Ridge <zeratul976 at hotmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 13 Mar 2009 10:54:23 +1100
- Subject: Re: missing return statement
- References: <BAY110-W315A19B2ABDCCF5C4572FA969F0@phx.gbl>
(Note that this is really a question for gcc-help.)
On Thu, 2009-03-12 at 23:42 +0000, Nathan Ridge wrote:
> Why does gcc not give an error about this?
> If I compile with "-Wall", it will give a WARNING saying
> "control reaches end of non-void function".
You can turn this warning into an error with -Werror.
Ben