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]
Other format: [Raw text]

Re: noreturn function attribute and ret asm instruction


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



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