Add support for -std=c++2a.
* c-common.h (cxx_dialect): Add cxx2a as a dialect. * opt.c: Add options for -std=c++2a and -std=gnu++2a. * c-opts.c (set_std_cxx2a): New. (c_common_handle_option): Set options when -std=c++2a is enabled. (c_common_post_options): Adjust comments. (set_std_cxx14, set_std_cxx17): Likewise. * doc/cpp.texi (__cplusplus): Document value for -std=c++2a or -std=gnu+2a. * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a. * lib/target-supports.exp (check_effective_target_c++17): Return 1 also if check_effective_target_c++2a. (check_effective_target_c++17_down): New. (check_effective_target_c++2a_only): New. (check_effective_target_c++2a): New. * g++.dg/cpp2a/cplusplus.C: New. * include/cpplib.h (c_lang): Add CXX2A and GNUCXX2A. * init.c (lang_defaults): Add rows for CXX2A and GNUCXX2A. (cpp_init_builtins): Set __cplusplus to 201709L for C++2a. Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r252850
This commit is contained in:
parent
41dfa93fb8
commit
026a79f70c
13 changed files with 129 additions and 8 deletions
|
@ -171,7 +171,8 @@ enum cpp_ttype
|
|||
enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11,
|
||||
CLK_STDC89, CLK_STDC94, CLK_STDC99, CLK_STDC11,
|
||||
CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11,
|
||||
CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17, CLK_ASM};
|
||||
CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17,
|
||||
CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM};
|
||||
|
||||
/* Payload of a NUMBER, STRING, CHAR or COMMENT token. */
|
||||
struct GTY(()) cpp_string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue