diff options
author | Jason Merrill <jason@redhat.com> | 2020-05-13 15:15:13 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-05-13 15:16:49 -0400 |
commit | b04445d4a809eaf0460fd4f1f35b1a7d458c8c72 (patch) | |
tree | 1d745c4af52475c2d51a48a637c14c520fa9664d /gcc/c-family/c-opts.c | |
parent | c3cb34c632222093718fc55f45dde68e97abf9dc (diff) | |
download | gcc-b04445d4a809eaf0460fd4f1f35b1a7d458c8c72.zip gcc-b04445d4a809eaf0460fd4f1f35b1a7d458c8c72.tar.gz gcc-b04445d4a809eaf0460fd4f1f35b1a7d458c8c72.tar.bz2 |
c++: Replace "C++2a" with "C++20".
C++20 isn't final quite yet, but all that remains is formalities, so let's
go ahead and change all the references.
I think for the next C++ standard we can just call it C++23 rather than
C++2b, since the committee has been consistent about time-based releases
rather than feature-based.
gcc/c-family/ChangeLog
2020-05-13 Jason Merrill <jason@redhat.com>
* c.opt (std=c++20): Make c++2a the alias.
(std=gnu++20): Likewise.
* c-common.h (cxx_dialect): Change cxx2a to cxx20.
* c-opts.c: Adjust.
* c-cppbuiltin.c: Adjust.
* c-ubsan.c: Adjust.
* c-warn.c: Adjust.
gcc/cp/ChangeLog
2020-05-13 Jason Merrill <jason@redhat.com>
* call.c, class.c, constexpr.c, constraint.cc, decl.c, init.c,
lambda.c, lex.c, method.c, name-lookup.c, parser.c, pt.c, tree.c,
typeck2.c: Change cxx2a to cxx20.
libcpp/ChangeLog
2020-05-13 Jason Merrill <jason@redhat.com>
* include/cpplib.h (enum c_lang): Change CXX2A to CXX20.
* init.c, lex.c: Adjust.
Diffstat (limited to 'gcc/c-family/c-opts.c')
-rw-r--r-- | gcc/c-family/c-opts.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 58ba094..bd617d3 100644 --- a/gcc/c-family/c-opts.c +++ b/gcc/c-family/c-opts.c @@ -112,7 +112,7 @@ static void set_std_cxx98 (int); static void set_std_cxx11 (int); static void set_std_cxx14 (int); static void set_std_cxx17 (int); -static void set_std_cxx2a (int); +static void set_std_cxx20 (int); static void set_std_c89 (int, int); static void set_std_c99 (int); static void set_std_c11 (int); @@ -636,10 +636,10 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value, set_std_cxx17 (code == OPT_std_c__17 /* ISO */); break; - case OPT_std_c__2a: - case OPT_std_gnu__2a: + case OPT_std_c__20: + case OPT_std_gnu__20: if (!preprocessing_asm_p) - set_std_cxx2a (code == OPT_std_c__2a /* ISO */); + set_std_cxx20 (code == OPT_std_c__20 /* ISO */); break; case OPT_std_c90: @@ -925,11 +925,11 @@ c_common_post_options (const char **pfilename) /* -Wcomma-subscript is enabled by default in C++20. */ SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_comma_subscript, - cxx_dialect >= cxx2a && warn_deprecated); + cxx_dialect >= cxx20 && warn_deprecated); /* -Wvolatile is enabled by default in C++20. */ SET_OPTION_IF_UNSET (&global_options, &global_options_set, warn_volatile, - cxx_dialect >= cxx2a && warn_deprecated); + cxx_dialect >= cxx20 && warn_deprecated); /* Declone C++ 'structors if -Os. */ if (flag_declone_ctor_dtor == -1) @@ -1021,9 +1021,9 @@ c_common_post_options (const char **pfilename) if (flag_sized_deallocation == -1) flag_sized_deallocation = (cxx_dialect >= cxx14); - /* char8_t support is new in C++2A. */ + /* char8_t support is new in C++20. */ if (flag_char8_t == -1) - flag_char8_t = (cxx_dialect >= cxx2a); + flag_char8_t = (cxx_dialect >= cxx20); if (flag_extern_tls_init) { @@ -1045,11 +1045,11 @@ c_common_post_options (const char **pfilename) if (warn_return_type == -1 && c_dialect_cxx ()) warn_return_type = 1; - /* C++2a is the final version of concepts. We still use -fconcepts + /* C++20 is the final version of concepts. We still use -fconcepts to know when concepts are enabled. Note that -fconcepts-ts can be used to include additional features, although modified to work with the standard. */ - if (cxx_dialect >= cxx2a || flag_concepts_ts) + if (cxx_dialect >= cxx20 || flag_concepts_ts) flag_concepts = 1; else if (flag_concepts) /* For -std=c++17 -fconcepts, imply -fconcepts-ts. */ @@ -1724,9 +1724,9 @@ set_std_cxx17 (int iso) /* Set the C++ 202a draft standard (without GNU extensions if ISO). */ static void -set_std_cxx2a (int iso) +set_std_cxx20 (int iso) { - cpp_set_lang (parse_in, iso ? CLK_CXX2A: CLK_GNUCXX2A); + cpp_set_lang (parse_in, iso ? CLK_CXX20: CLK_GNUCXX20); flag_no_gnu_keywords = iso; flag_no_nonansi_builtin = iso; flag_iso = iso; @@ -1734,8 +1734,8 @@ set_std_cxx2a (int iso) flag_isoc94 = 1; flag_isoc99 = 1; flag_isoc11 = 1; - /* C++2a includes concepts. */ - cxx_dialect = cxx2a; + /* C++20 includes concepts. */ + cxx_dialect = cxx20; lang_hooks.name = "GNU C++17"; /* Pretend C++17 until standardization. */ } |