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
2 changed files with 10 additions and 1 deletions
|
@ -461,7 +461,13 @@ cpp_init_builtins (cpp_reader *pfile, int hosted)
|
|||
_cpp_define_builtin (pfile, "__STDC__ 1");
|
||||
|
||||
if (CPP_OPTION (pfile, cplusplus))
|
||||
_cpp_define_builtin (pfile, "__cplusplus 199711L");
|
||||
{
|
||||
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");
|
||||
}
|
||||
else if (CPP_OPTION (pfile, lang) == CLK_ASM)
|
||||
_cpp_define_builtin (pfile, "__ASSEMBLER__ 1");
|
||||
else if (CPP_OPTION (pfile, lang) == CLK_STDC94)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue