delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/02/08/07:23:20

Message-ID: <003e01c091c9$e8796de0$fb4b893e@oemcomputer>
From: "Stephen Silver" <djgpp AT argentum DOT freeserve DOT co DOT uk>
To: "DJGPP Workers" <djgpp-workers AT delorie DOT com>
Subject: Re: setjmp.h - namespace std patch
Date: Thu, 8 Feb 2001 12:23:11 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Reply-To: djgpp-workers AT delorie DOT com

Eli Zaretskii wrote:

> On Wed, 7 Feb 2001, Stephen Silver wrote:

> > One slight complication here is that the C++ standard requires
> > setjmp to be a macro, but DJGPP defines it as a function.
>
> Could you please cite the standard where it says that?

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]

> Anyway, can you define setjmp to itself?  Would that make the C++
> standard and the compiler happy?

Yes.  It would still be necessary to make the setjmp function visible
in the global namespace in order to ensure that the macro works, but
I don't see a problem with that.  I'll post a revised patch when we've
resolved the issue of what to do about old versions of g++ (see my
other post).

Stephen

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019