NetBSD Problem Report #7112
Received: (qmail 24235 invoked from network); 8 Mar 1999 22:00:04 -0000
Message-Id: <199903082159.WAA00660@ulysses.df.lth.se>
Date: Mon, 8 Mar 1999 22:59:20 +0100 (CET)
From: Krister Walfridsson <cato@ulysses.df.lth.se>
Reply-To: cato@ulysses.df.lth.se
To: gnats-bugs@gnats.netbsd.org
Subject: setjmp is a function
X-Send-Pr-Version: 3.95
>Number: 7112
>Category: standards
>Synopsis: setjmp is a function
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Mar 08 14:05:01 +0000 1999
>Closed-Date: Tue Mar 09 12:26:40 +0000 1999
>Last-Modified: Tue Mar 09 12:33:31 +0000 1999
>Originator: Krister Walfridsson
>Release: NetBSD-current 8 Mar, 1999
>Organization:
>Environment:
System: NetBSD ulysses 1.3K NetBSD 1.3K (GENERIC) #0: Mon Mar 8 21:05:08 CET 1999 cato@ulysses:/dsk2/tmp/nbsd990308.i386/src/sys/arch/i386/compile/GENERIC i386
>Description:
There was a discussion on the egcs mailinglist some time ago, where one of
the language lawyers whined about that many OS don't follow the ANSI C
standard wrt setjmp.
If you look at 7.6.1.1, you'll find
7.6.1.1 The setjmp macro
but our setjmp is a function, so we are not really following the standard...
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Jason Thorpe <thorpej@nas.nasa.gov>
To: cato@ulysses.df.lth.se
Cc: gnats-bugs@gnats.netbsd.org, tech-userlevel@netbsd.org
Subject: Re: standards/7112: setjmp is a function
Date: Mon, 08 Mar 1999 15:25:49 -0800
On Mon, 8 Mar 1999 22:59:20 +0100 (CET)
Krister Walfridsson <cato@ulysses.df.lth.se> wrote:
> >Description:
> There was a discussion on the egcs mailinglist some time ago, where one of
> the language lawyers whined about that many OS don't follow the ANSI C
> standard wrt setjmp.
>
> If you look at 7.6.1.1, you'll find
>
> 7.6.1.1 The setjmp macro
>
> but our setjmp is a function, so we are not really following the standard...
I don't really see how this can be an issue. What if the macro itself
calls functions?! I.e. you might just have to do that on some systems
(e.g. SVR4 which uses getcontext(2) to do setjmp(3)).
-- Jason R. Thorpe <thorpej@nas.nasa.gov>
From: cgd@netbsd.org (Chris G. Demetriou)
To: Jason Thorpe <thorpej@nas.nasa.gov>
Cc: cato@ulysses.df.lth.se, gnats-bugs@gnats.netbsd.org,
tech-userlevel@netbsd.org
Subject: Re: standards/7112: setjmp is a function
Date: 08 Mar 1999 16:27:13 -0800
Jason Thorpe <thorpej@nas.nasa.gov> writes:
> > If you look at 7.6.1.1, you'll find
> >
> > 7.6.1.1 The setjmp macro
> >
> > but our setjmp is a function, so we are not really following the standard...
>
> I don't really see how this can be an issue. What if the macro itself
> calls functions?! I.e. you might just have to do that on some systems
> (e.g. SVR4 which uses getcontext(2) to do setjmp(3)).
if it's a function, it's a function.
if it's a macro, and you #undef it, it goes away.
that's all i can possibly think of. of course, Solaris does:
#if __STDC__ != 0
#define setjmp(env) setjmp(env)
#endif
so my thought above doesn't really make sense, even.
The only possible reason i could think for wanting it to be a macro
and having the solaris behaviour be allowed would be if the desire
were to have people say "#define setjmp foo" and have it cause
an error (macro definitions not matching)... but i have No Clue why
that would be useful behaviour.
cgd
--
Chris Demetriou - cgd@netbsd.org - http://www.netbsd.org/People/Pages/cgd.html
Disclaimer: Not speaking for NetBSD, just expressing my own opinion.
From: yasufu-i@is.aist-nara.ac.jp (ITOH Yasufumi)
To: cato@ulysses.df.lth.se
Cc: gnats-bugs@gnats.netbsd.org, tech-userlevel@netbsd.org
Subject: Re: standards/7112: setjmp is a function
Date: Tue, 9 Mar 1999 12:37:09 +0900 (JST)
In article <199903082159.WAA00660@ulysses.df.lth.se>
cato@ulysses.df.lth.se writes:
> >Description:
> There was a discussion on the egcs mailinglist some time ago, where one of
> the language lawyers whined about that many OS don't follow the ANSI C
> standard wrt setjmp.
If you have ISO C specification handy, look at Annex G (pp. 199).
G.1 Unspecified behavior
The following are unspecified:
:
- Whether setjmp is a macro or an external identifier (7.6.1.1).
Regards,
--
ITOH, Yasufumi <yasufu-i@is.aist-nara.ac.jp>, <itohy@netbsd.org>
State-Changed-From-To: open->closed
State-Changed-By: kleink
State-Changed-When: Tue Mar 9 04:26:40 PST 1999
State-Changed-Why:
Rejected per Annex G.1, cited by yasufu-i@is.aist-nara.ac.jp (ITOH Yasufumi)
and to be found in the audit trail.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.