Hi,<br><br>I'm using LLVM 2.0 on cygwin and x86_64-linux-gnu. If I compile a simple program using setjmp:<br><br>#include <setjmp.h><br>extern jmp_buf j;<br>extern void g(void);<br>int f(void)<br>{<br>  volatile int v = 0;
<br>  if (setjmp(j))<br>    return v;<br>  v = 1;<br>  g();<br>  return 0;<br>}<br><br>the resulting bitcode doesn't use LLVM's exception handling intrinsics, it just has a call to a function called "_setjmp". And there doesn't seem to be any provision for returning the current value of the volatile variable v if setjmp returns non-zero - the bitcode always returns zero, whereas the spec for setjmp() says that f() should return 1 if g() does a longjmp().
<br><br>If I change my program to call __builtin_setjmp() explicitly, instead of setjmp(), the resulting bitcode has optimised the call away as if it always returned zero.
<br><br>So is setjmp supported at all with llvm-gcc4? I couldn't see anything in the release notes saying that it isn't.<br><br>Thanks,<br>Jay.<br>