[cfe-dev] __builtin_setjmp compatability with gcc
stuart.rudderham at intel.com
Mon Sep 24 09:42:40 PDT 2012
I've noticed that the __builtin_setjmp function does different things on Clang compared to GCC. On Clang only the stack pointer and frame pointer are saved, while GCC also saves the address that is used to longjmp back. This is causing problems (segfaults) with code compiled using Clang that links with a library built with GCC.
The file /include/clang/Basic/Builtins.def seems to imply that they should be compatible, as __buildin_setjmp is listed under the header "Random GCC Builtins".
Is this a bug with Clang or the intended behavior?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev