This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

17_intro/header_csetjmp.cc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]