mirror of git://gcc.gnu.org/git/gcc.git
re PR libstdc++/1773 (__cplusplus defined to 1, should be 199711L)
PR libstdc++/1773 * init.c (cpp_init_builtins): Set __cplusplus for C++11. From-SVN: r180708
This commit is contained in:
parent
97e3ad20b1
commit
1fb80b0c53
|
|
@ -1,5 +1,8 @@
|
||||||
2011-10-31 Jason Merrill <jason@redhat.com>
|
2011-10-31 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR libstdc++/1773
|
||||||
|
* init.c (cpp_init_builtins): Set __cplusplus for C++11.
|
||||||
|
|
||||||
PR c++/50920
|
PR c++/50920
|
||||||
* include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
|
* include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11,
|
||||||
CLK_GNUCXX0X to CLK_GNUCXX11.
|
CLK_GNUCXX0X to CLK_GNUCXX11.
|
||||||
|
|
|
||||||
|
|
@ -461,7 +461,13 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
|
||||||
_cpp_define_builtin (pfile, "__STDC__ 1");
|
_cpp_define_builtin (pfile, "__STDC__ 1");
|
||||||
|
|
||||||
if (CPP_OPTION (pfile, cplusplus))
|
if (CPP_OPTION (pfile, cplusplus))
|
||||||
|
{
|
||||||
|
if (CPP_OPTION (pfile, lang) == CLK_CXX11
|
||||||
|
|| CPP_OPTION (pfile, lang) == CLK_GNUCXX11)
|
||||||
|
_cpp_define_builtin (pfile, "__cplusplus 201103L");
|
||||||
|
else
|
||||||
_cpp_define_builtin (pfile, "__cplusplus 199711L");
|
_cpp_define_builtin (pfile, "__cplusplus 199711L");
|
||||||
|
}
|
||||||
else if (CPP_OPTION (pfile, lang) == CLK_ASM)
|
else if (CPP_OPTION (pfile, lang) == CLK_ASM)
|
||||||
_cpp_define_builtin (pfile, "__ASSEMBLER__ 1");
|
_cpp_define_builtin (pfile, "__ASSEMBLER__ 1");
|
||||||
else if (CPP_OPTION (pfile, lang) == CLK_STDC94)
|
else if (CPP_OPTION (pfile, lang) == CLK_STDC94)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue