noreturn function attribute and ret asm instruction

Jim Wilson wilson@tuliptree.org
Mon Aug 25 20:30:00 GMT 2003


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



More information about the Gcc-bugs mailing list