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


On Tue, 2 Sep 2003, Zack Weinberg wrote:

> The objection I remember is "use __builtin_trap()", but that is
> not flexible enough to replace the above, nor is it universally
> implemented.

How about a more general __builtin_unreached(), telling the compiler to
assume (without generating any trap for safety, so potentially allowing
more optimization) that a particular point in the code (e.g., the end of a
function here) can never be reached?

-- 
Joseph S. Myers
jsm@polyomino.org.uk


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