Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!linus!decvax!genrad!mit-eddie!godot!ima!ism780b!jim
From: jim@ism780b.UUCP
Newsgroups: net.lang.c
Subject: Re: Re: setjmp: read the manual
Message-ID: <70@ism780b.UUCP>
Date: Thu, 18-Oct-84 00:32:41 EDT
Article-I.D.: ism780b.70
Posted: Thu Oct 18 00:32:41 1984
Date-Received: Fri, 19-Oct-84 06:38:57 EDT
Lines: 0
Nf-ID: #R:sun:-173500:ism780b:25500043:000:756
Nf-From: ism780b!jim    Oct 16 19:47:00 1984

>>To fix a program that this breaks, you remove "register" declarations from
>>routines that call setjmp.  Not so bad.
>
>Don't you also have to start removing the register declarations in the
>functions that call functions that call setjmp?  Seems like you could
>lose their (parents to funcs that call setjmp) register values further
>down in the call chain also...

No.  If setjmp saves all registers and longjmp restores them, the registers
are back to what they were at the time of the setjmp, so the parent is ok
(unless your program is in the form of a temporal Klein Bottle, and the
instantiation of the routine that called the routine that called setjmp
happened after the call to setjmp, somehow :-)

-- Jim Balter, INTERACTIVE Systems (ima!jim)