This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
17_intro/header_csetjmp.cc
- To: libstdc++ at gcc dot gnu dot org
- Subject: 17_intro/header_csetjmp.cc
- From: Loren James Rittle <rittle at latour dot rsch dot comm dot mot dot com>
- Date: Wed, 28 Mar 2001 18:00:28 -0600 (CST)
- Reply-to: rittle at rsch dot comm dot mot dot com
17_intro/header_csetjmp.cc is failing with:
[...]/17_intro/header_csetjmp.cc:32:6: #error "setjmp_must_be_a_macro"
According to section 17.4.1.2 clause 5 of ISO 14882:1998 "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."
According to section 7.13 clause 3 of ISO 9899:1999: "It is
unspecified whether setjmp is a macro or an identifier declared with
external linkage."
Thus <csetjmp> [i.e. ./std/csetjmp or the file it directly includes
(Aside, is it: ./c/bits/std_csetjmp.h or ./c_std/bits/std_csetjmp.h? ;-)]
should provide a macro for setjmp if it is not found after including
<setjmp.h>.
This code should go in one of those files (I personally think it
should go right after the ``#include <setjmp.h>''):
#ifndef setjmp
#define setjmp(env) setjmp (env)
#endif
I will do a patch, if someone tells me how to know which file it
should go in. ;-)
Regards,
Loren