🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4280

Re: setjmp restrictions

#4280
From: Tanmoy Bhattacharya
Date: Thu, 26 Oct 1995 23:35
32 lines
1735 bytes
In article <814744121snz@wbriscoe.demon.co.uk>, walter briscoe
<walter@wbriscoe.demon.co.uk> writes: 
|> In article <814632687snz@soliton.demon.co.uk>
|>            ian@soliton.demon.co.uk "Ian Cargill" writes:
|> 
|> > The restrictions on where setjmp can be placed seem fairly 
|> > logical - for reasons outlined in the Rationale.  But...
|> > One construct that is not allowed is 
|> > 
|> > a = setjmp(buf);
|> > if(a)
|> >  . . .
|> > 
|> > Any particular reason why this might not be allowed?  I wouldn't 
|> > have thought it was a problem with temporaries.  
|> 
|> Can't answer the question. However, this construct used to fail in DEC's
|> VAX C 3.x.

It seems to me that the restrictions in the standard are such that longjmp
can be implemented as a jumptable at compile time. `a = setjmp(buf)' cannot
be.

Cheers
Tanmoy
-- 
tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
<http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
fax: 1 (505) 665 3003   voice: 1 (505) 665 4733    [ Home: 1 (505) 662 5596 ]
Technical Details
Message-ID: <46p60k$nbu@newshost.lanl.gov>
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy
References: <814632687snz@soliton.demon.co.uk> <814744121snz@wbriscoe.demon.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!qcd.lanl.gov!tanmoy
From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
Newsgroups: comp.std.c
Subject: Re: setjmp restrictions
Date: 26 Oct 1995 23:35:47 GMT
Organization: Los Alamos National Laboratory
Distribution: world
Message-ID: <46p60k$nbu@newshost.lanl.gov>
References: <814632687snz@soliton.demon.co.uk> <814744121snz@wbriscoe.demon.co.uk>
NNTP-Posting-Host: qcd.lanl.gov