This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ATTRIBUTE_NORETURN on sets_cc0_p
- To: law at cygnus dot com
- Subject: Re: ATTRIBUTE_NORETURN on sets_cc0_p
- From: Andreas Schwab <schwab at issan dot informatik dot uni-dortmund dot de>
- Date: 16 Oct 1998 10:33:58 +0200
- Cc: mark at markmitchell dot com, egcs at cygnus dot com, "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- References: <12014.908436426@hurl.cygnus.com>
Jeffrey A Law <law@cygnus.com> writes:
|> In message <199810150200.TAA14764@smtp.earthlink.net>you write:
|> >
|> > On x86-linux-gnu (which defines HAVE_cc0), I'm seeing:
|> >
|> > ../../gcc/jump.c: In function `sets_cc0_p':
|> > ../../gcc/jump.c:3335: warning: function declared `noreturn' has a `return'
|> > statement
|> >
|> > That's not good; this function does return and we don't want the
|> > compiler assuming it doesn't. That could be very dangerous.
|> >
|> > I see that rtl.h has:
|> >
|> > extern int sets_cc0_p PROTO ((rtx))
|> > #ifndef HAVE_cc0
|> > ATTRIBUTE_NORETURN
|> > #endif
|> > ;
|> >
|> > Perhaps HAVE_cc0 is not yet be set at that point?
|> That would be my guess.
It looks pretty bogus to me to have a function that returns a value but
does not return. ATTRIBUTE_NORETURN does not make sense on a non-void
function and is most likely misplaced here.
Andreas.