diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2011-08-18 17:29:10 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2011-08-18 17:29:10 +0000 |
commit | 32fe396e05443a67367a3c454b7c6d574ea7e58e (patch) | |
tree | cd3c7602c4e64e443acc5511a27cc44f66612bfb /libcpp | |
parent | 7afac11005625275db3bbdb22a1bdd778871efae (diff) | |
download | gcc-32fe396e05443a67367a3c454b7c6d574ea7e58e.zip gcc-32fe396e05443a67367a3c454b7c6d574ea7e58e.tar.gz gcc-32fe396e05443a67367a3c454b7c6d574ea7e58e.tar.bz2 |
Properly define __cplusplus (PR libstdc++-v3/1773)
PR libstdc++/1773
* init.c (cpp_init_builtins): Define __cplusplus 19971L.
From-SVN: r177877
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 5 | ||||
-rw-r--r-- | libcpp/init.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 4ee0363..81b3a94 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR libstdc++/1773 + * init.c (cpp_init_builtins): Define __cplusplus 19971L. + 2011-08-18 Joseph Myers <joseph@codesourcery.com> * include/cpplib.h (struct cpp_options): Fix typo. diff --git a/libcpp/init.c b/libcpp/init.c index 1cbb9dd..93f12d0 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -455,7 +455,7 @@ cpp_init_builtins (cpp_reader *pfile, int hosted) _cpp_define_builtin (pfile, "__STDC__ 1"); if (CPP_OPTION (pfile, cplusplus)) - _cpp_define_builtin (pfile, "__cplusplus 1"); + _cpp_define_builtin (pfile, "__cplusplus 199711L"); else if (CPP_OPTION (pfile, lang) == CLK_ASM) _cpp_define_builtin (pfile, "__ASSEMBLER__ 1"); else if (CPP_OPTION (pfile, lang) == CLK_STDC94) |