Xref: utzoo comp.std.c:1083 comp.sys.encore:219 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!ut-emx!ut-emx.UUCP!clyde From: clyde@ut-emx.UUCP (Clyde W. Hoover) Newsgroups: comp.std.c,comp.sys.encore Subject: Re: setjmp/longjmp Keywords: setjmp, longjmp Message-ID: <12491@ut-emx.UUCP> Date: 27 Apr 89 15:48:23 GMT References: <1447@cunixc.cc.columbia.edu> Sender: news@ut-emx.UUCP Lines: 13 Well, we ran headlong into that very problem ourselves. What is going on is that the Encore C compiler puts variables into registers (making the 'register' declaration somewhat superflous). Upon longjmp, the contents of the registers are restored to what they were at the time of the call to setjmp and since your flag has been stuffed into a register, it is being reset. Declaring your flag variable as 'static', should solve your problem, though even that did not work with older versions of the compiler. -Clyde Hoover Shouter-To-Dead-Parrots @ Univ. of Texas Computation Center; Austin, Texas clyde@emx.utexas.edu; ...!cs.utexas.edu!ut-emx!clyde Tip #268: Don't feel insecure or inferior! Remember, you're ORGANIC!! You could win an argument with almost any rock!