[cfe-dev] clang vs. gcc
Chris Lattner
clattner at apple.com
Sat May 2 12:27:38 PDT 2009
On May 1, 2009, at 10:25 AM, Filipe Cabecinhas wrote:
> I'm just trying to compile valgrind. But valgrind is using
> __builtin_longjmp because it can't use libc. This doesn't compile
> because clang doesn't define that function. How could I pass this
> problem?
The best way is to implement __builtin_longjmp in clang!
-Chris
>
>
> Chris Lattner wrote:
>> On May 1, 2009, at 10:19 AM, Filipe Cabecinhas wrote:
>>> So... There's no way I can use a setjmp/longjmp (or something that
>>> has the same effect) without using libc? or I can just use setjmp/
>>> longjmp happily (when compiling with clang) and it will get
>>> translated to something other than the call to libc?
>> Are you experiencing an actual problem here? While C doesn't
>> specify that this is legal, you can probably get away with it.
>> Just mark any local variables as volatile.
>> -Chris
More information about the cfe-dev
mailing list