Strange warning (variable might be clobbered by `longjmp' or

Richard Henderson rth@cygnus.com
Wed Sep 3 13:09:00 GMT 1997


> Exactly my point.  Is the lack of a call, and thus the lack of knowledge that
> the "EH setjmp" returns twice part of the problem?

No, there is a NOTE_INSN_SETJMP emitted, which folks examine.  Whether
they do exactly the right thing is still in question though.

> Does jumping back to the setjmp code make the implementation easier?  I don't
> really know since I've never looked at the sjlj exception code.

The sjlj exception code calls expand_builtin_setjmp, which if it
is to replace the function of the same name, must arrive at a 
single location with a value.

However, there is a more efficient way to do this.  I don't know
if it is possible to do in general, since I'm not sure how jumps
get folded and whatnot from normal if statements.

What we want is for there not to be a test zero/non-zero, we want
the setjmp expander to send flow the proper place without a test,
since it knows already due to its construction. 

Perhaps the easiest thing to do is pass expand_builtin_setjmp two
more arguments that say where to go for true and false control flows. 
In sjlj, we give it the labels we already have; in expand_builtin,
we pass it the same label for both so it still looks like a function.


r~



More information about the Gcc mailing list