This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, Joe Buck <Joe dot Buck at synopsys dot COM>,Bruce Korb <bkorb at pacbell dot net>, Robert Dewar <dewar at gnat dot com>,gcc at gcc dot gnu dot org
- Date: Thu, 3 Oct 2002 16:50:40 -0700
- Subject: Re: module level flags
- References: <orwup1yivv.fsf@free.redhat.lsd.ic.unicamp.br> <200210021914.g92JEPB07677@piper>
On Wed, Oct 02, 2002 at 12:13:25PM -0700, Joe Buck wrote:
>
> My suggestion was that in cases that are always an error (assuming that
> the function gets called at all), we might as well issue a hard error.
> "But the function might never be called", you reply. So what? In
> principle the compiler could replace the whole function by abort(),
> but I see no practical (as opposed to pedantic) reason why issuing a hard
> error in such cases is not allowed.
I believe that in other such cases, current practice is to issue a
warning and replace just the offending operation with a call to
abort(), which is nice and conservative. For instance, look at stmt.c
(expand_nl_goto_receivers). I thought there was a case like this in
the C++ front end but I can't find it just now.
zw