This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c/3764: Gcc incorrectly complains that a noreturn function returns


On Mon, Jul 23, 2001 at 01:35:53AM -0700, Richard Henderson wrote:
> On Mon, Jul 23, 2001 at 10:17:08AM +0200, Erik Mouw wrote:
> > If the compiler doesn't listen to the directive, it will never
> > be able to perform optimisations, and the attribute is useless.
> 
> It did listen to the directive.  It also decided that it would
> check up on you to see if you made a mistake.  It thought you did.

So if the code in question concluded with

    ... some weird memory assignment ...

    exit(1);  /* NOTREACHED */
   }

then it would recognize that this function isn't coming back?

Phil

-- 
Would I had phrases that are not known, utterances that are strange, in
new language that has not been used, free from repetition, not an utterance
which has grown stale, which men of old have spoken.
                                     - anonymous Egyptian scribe, c.1700 BC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]