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/cp/method.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/cp/method.c')
-rw-r--r-- | gcc/cp/method.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 47f96aa..3f8842b 100644 --- a/gcc/cp/method.c +++ b/gcc/cp/method.c @@ -1095,10 +1095,10 @@ early_check_defaulted_comparison (tree fn) ctx = DECL_FRIEND_CONTEXT (fn); bool ok = true; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { - error_at (loc, "defaulted %qD only available with %<-std=c++2a%> or " - "%<-std=gnu++2a%>", fn); + error_at (loc, "defaulted %qD only available with %<-std=c++20%> or " + "%<-std=gnu++20%>", fn); return false; } @@ -1802,7 +1802,7 @@ constructible_expr (tree to, tree from) const int len = list_length (from); if (len > 1) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) /* Too many initializers. */ return error_mark_node; @@ -1831,7 +1831,7 @@ constructible_expr (tree to, tree from) /* If t(e) didn't work, maybe t{e} will. */ if (expr == NULL_TREE && len == 1 - && cxx_dialect >= cxx2a) + && cxx_dialect >= cxx20) { from = build_constructor_single (init_list_type_node, NULL_TREE, from); @@ -2074,7 +2074,7 @@ walk_field_subobs (tree fields, special_function_kind sfk, tree fnname, be constexpr, every member must have a user-provided default constructor or an explicit initializer. */ if (constexpr_p - && cxx_dialect < cxx2a + && cxx_dialect < cxx20 && !CLASS_TYPE_P (mem_type) && TREE_CODE (DECL_CONTEXT (field)) != UNION_TYPE) { @@ -2226,11 +2226,11 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, /* "The closure type associated with a lambda-expression has a deleted default constructor and a deleted copy assignment operator." This is diagnosed in maybe_explain_implicit_delete. - In C++2a, only lambda-expressions with lambda-captures have those + In C++20, only lambda-expressions with lambda-captures have those deleted. */ if (LAMBDA_TYPE_P (ctype) && (sfk == sfk_constructor || sfk == sfk_copy_assignment) - && (cxx_dialect < cxx2a + && (cxx_dialect < cxx20 || LAMBDA_EXPR_CAPTURE_LIST (CLASSTYPE_LAMBDA_EXPR (ctype)) || LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (CLASSTYPE_LAMBDA_EXPR (ctype)) != CPLD_NONE)) @@ -2274,7 +2274,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p, if (constexpr_p) *constexpr_p = (SFK_CTOR_P (sfk) || (SFK_ASSIGN_P (sfk) && cxx_dialect >= cxx14) - || (SFK_DTOR_P (sfk) && cxx_dialect >= cxx2a)); + || (SFK_DTOR_P (sfk) && cxx_dialect >= cxx20)); bool expected_trivial = type_has_trivial_fn (ctype, sfk); if (trivial_p) |