X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Thu, 8 Feb 2001 15:38:31 +0100 (MET) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: DJGPP Workers cc: Stephen Silver Subject: Re: setjmp.h - namespace std patch In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from QUOTED-PRINTABLE to 8bit by delorie.com id JAA31007 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Thu, 8 Feb 2001, Eli Zaretskii wrote: > > On Thu, 8 Feb 2001, Stephen Silver wrote: > > > 17.4.1.2 paragraph 5: > > > > Names which are defined as macros in C shall be defined as > > macros in the C++ Standard Library, even if C grants license for > > implementation as functions. [Note: the names defined as macros > > in C include the following: assert, errno, offsetof, setjmp, > > va_arg, va_end, and va_start. —end note] > > This seems to indicate that setjmp should be a macro in C as well. Well, the headline of the relevant section in the ISO C90 standard is: 7.6.1.1 The setjmp macro :-) And in the chapter lead-in (7.6), it explicitly states that no program is allowed to do either of the following *) #undef setjmp *) call (setjmp)(myjmpbuf) to access the function setjmp, not the macro. *) define their own function setjmp (with external linkage) I.e., for all means and purposes outside the C implementation itself, setjmp *is* a macro. > perhaps we need to make "#define setjmp setjmp" be visible even outside > #ifdef __cplusplus. At least it wouldn't hurt. The language definition clearly says that any program that would be broken by such a #define deserves to be broken. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.