This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: noreturn function attribute and ret asm instruction
- From: Jim Wilson <wilson at tuliptree dot org>
- To: Kristis Makris <kristis dot makris at asu dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Aug 2003 13:30:34 -0700
- Subject: Re: noreturn function attribute and ret asm instruction
- References: <1061654032.13013.9.camel@syd.monet.net>
An extended asm isn't allowed to change the flow of control. So this is
an invalid asm.
noreturn does not suppress the ret instruction at the end of a function.
What it does is tell the compiler that if we call a function defined
as noreturn, then the call won't return. There is no function call at
the end of your function, so it can't be a noreturn function. If you
compile with -Wall, it will tell you this.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com