[cfe-dev] clang vs. gcc

Eli Friedman eli.friedman at gmail.com
Sat May 2 17:09:32 PDT 2009


On Sat, May 2, 2009 at 1:31 PM, Chris Lattner <clattner at apple.com> wrote:
>> We could make
>> __builtin_setjmp and __builtin_longjmp compile to setjmp and longjmp
>> calls, but that doesn't seem like it would help much.
>
> That is what llvm-gcc does, and it appears to work.

No, llvm-gcc simply ignores __builtin_longjmp (!).  Take a look at the
output for "int a(void* x) { __builtin_longjmp(x,1); }" to see what I
mean.  The only reason it "works" is that __builtin_longjmp is very
rarely used.

-Eli



More information about the cfe-dev mailing list