c/3764: Gcc incorrectly complains that a noreturn function returns
Mon Jul 23 02:22:00 GMT 2001
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?
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
More information about the Gcc-bugs