[LLVMdev] Semantics of __builtin_setjmp/__builtin_longjmp

Tim Northover t.p.northover at gmail.com
Tue Feb 10 13:16:32 PST 2015


> (b) Are they supposed to be compatible with GCC?

I think they're probably not supposed to be compatible with libc, but
should be with GCC.

Libc gets to choose its implementation in setjmp.h. It might implement
them completely separately (which would still work however we
implement the __builtins), or it might make use of the __builtins (in
which case we should certainly make sure they're compatible).

> If not with libc, why with GCC?

Because the GCC builtins are an ABI issue controlled by the compiler:
we need to be compatible to mix object files on the platform.

Cheers.

Tim.



More information about the llvm-dev mailing list