🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5979

Re: setjmp/longjmp

#5979
From: Norman Diamond
Date: Mon, 01 May 1989 05:55
30 lines
2332 bytes
In article <1989Apr29.232632.23997@utzoo.uucp> henry@utzoo.uucp (Henry Spencer) writes:

I >>>... a very clever compiler can change save/restore conventions when
N >>>it notices the setjmp() ....
E >>
W >>This is a reasonable approach.  setjmp/longjmp are rare enough that I
S >>doubt it will slow things much.
  >
I >I and others argued, as formal public comments, that odd behavior of
S >local variables should be restricted to variables declared "register",
  >on the grounds that the only real problem is silent promotion of non-
A >"register" variables into registers, and compilers that are smart enough
  >to do that are smart enough to notice setjmp and change conventions.
P >(Dumb compilers may be generating code on the fly, meaning that they
R >can't easily go back and fix earlier code on seeing setjmp(), but such
I >compilers generally wouldn't have enough info to promote variables.)
C >People are more or less used to problems with "register" variables after
K >longjmp; extending it to all local variables breaks a lot of programs.

Interesting.  What were the formal answers?  (I'd guess that there were no
actual answers but only formal answers :-)

Perhaps the marketplace should be encouraged to support this pseudo-standard.
If customers refuse to buy compilers with misfeatures, even if the compilers
are compliant, correct results can be obtained.

Norman Diamond, Sony Computer Science Lab (diamond%csl.sony.jp@relay.cs.net)
  The above opinions are my own.   |  Why are programmers criticized for
  If they're also your opinions,   |  re-inventing the wheel, when car
  you're infringing my copyright.  |  manufacturers are praised for it?
Technical Details
Message-ID: <10203@socslgw.csl.sony.JUNET>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond
References: <1447@cunixc.cc.columbia.edu> <1989Apr27.165319.23986@utzoo.uucp> <17179@mimsy.UUCP> <1989Apr29.232632.23997@utzoo.uucp>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!kddlab!titcca!sragwa!wsgw!socslgw!diamond!diamond
From: diamond@diamond.csl.sony.junet (Norman Diamond)
Newsgroups: comp.std.c,comp.sys.encore
Subject: Re: setjmp/longjmp
Message-ID: <10203@socslgw.csl.sony.JUNET>
Date: 1 May 89 05:55:17 GMT
References: <1447@cunixc.cc.columbia.edu> <1989Apr27.165319.23986@utzoo.uucp> <17179@mimsy.UUCP> <1989Apr29.232632.23997@utzoo.uucp>
Sender: news@csl.sony.JUNET
Reply-To: diamond@csl.sony.junet (Norman Diamond)
Followup-To: comp.std.c
Organization: /usr/lib/news/organization
Lines: 30