[cfe-dev] clang vs. gcc

Filipe Cabecinhas filcab at gmail.com
Fri May 1 10:25:29 PDT 2009


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?

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