setjmp as macro
Paul Rabin
rabin at osf.org
Tue Aug 28 01:04:56 AEST 1990
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
More information about the Comp.std.c
mailing list