🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1623

setjmp as macro

#1623
From: Paul Rabin
Date: Mon, 27 Aug 1990 15:04
20 lines
1142 bytes
ANSI C (4.1.6) says that except where otherwise specified, all library
routines must be implemented as functions; additional macro
implementations are permissible, but these must behave like functions.
In particular, macro implementations of library functions must
evaluate their arguments exactly once.

In 4.6, setjmp is "otherwise specified": setjmp may be implemented as
either a macro or a function.  Conforming applications may not
assume either that a function is defined or that a function is not
defined.

My question:

	Does ANSI C require that a macro implementation of setjmp
	evaluate its arguments exactly once?  If so, do you have a
	suggestion for handling the jmp_buf argument?  

Thanks!

	-Paul Rabin
Technical Details
Message-ID: <12516@paperboy.OSF.ORG>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!paperboy!osf.org!rabin

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!usc!snorkelwacker!paperboy!osf.org!rabin
From: rabin@osf.org (Paul Rabin)
Newsgroups: comp.std.c
Subject: setjmp as macro
Message-ID: <12516@paperboy.OSF.ORG>
Date: 27 Aug 90 15:04:56 GMT
Sender: news@OSF.ORG
Reply-To: rabin@osf.org (Paul Rabin)
Organization: Open Software Foundation
Lines: 20