longjmp()/setjmp() difference between gcc 3.3 (Apple) and gcc 3.4.x

Richard Henderson rth@redhat.com
Sun Jan 23 12:55:00 GMT 2005


On Sun, Jan 23, 2005 at 12:27:42AM +0000, Remy Martin wrote:
> Hmm. This explains my observation on the counter variable, but the (forced) 
> jump itself is executed correctly. Can that be because setjmp's frame was 
> called in a loop doing hardly anything else, so that the jmpbuf contents 
> remained largely valid?

Yes.  I.e. it worked by accident.

> Or can I take your remark to mean that if I call the function that does the 
> setjmp (contains the jump target) from my main(), the jmpbuf will remain 
> valid?

Absolutely not.


r~



More information about the Gcc mailing list