🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5944

Re: setjmp/longjmp

#5944
From: Clyde W. Hoover
Date: Thu, 27 Apr 1989 15:48
13 lines
1202 bytes
	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!
Technical Details
Message-ID: <12491@ut-emx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!ut-emx!ut-emx.UUCP!clyde
References: <1447@cunixc.cc.columbia.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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