Path: 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 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