Mail Archives: djgpp-workers/2001/02/08/10:59:11
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.
- Raw text -