aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-05-13 15:15:13 -0400
committerJason Merrill <jason@redhat.com>2020-05-13 15:16:49 -0400
commitb04445d4a809eaf0460fd4f1f35b1a7d458c8c72 (patch)
tree1d745c4af52475c2d51a48a637c14c520fa9664d /gcc/cp/class.c
parentc3cb34c632222093718fc55f45dde68e97abf9dc (diff)
downloadgcc-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/class.c')
-rw-r--r--gcc/cp/class.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b66b8d4..15f490d 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5314,7 +5314,7 @@ trivial_default_constructor_is_constexpr (tree t)
struct S { int i; constexpr S() = default; };
should work. */
- return (cxx_dialect >= cxx2a
+ return (cxx_dialect >= cxx20
|| is_really_empty_class (t, /*ignore_vptr*/true));
}
@@ -5691,7 +5691,7 @@ finalize_literal_type_property (tree t)
CLASSTYPE_LITERAL_P (t) = false;
else if (CLASSTYPE_LITERAL_P (t)
&& TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
- && (cxx_dialect < cxx2a || !type_maybe_constexpr_destructor (t)))
+ && (cxx_dialect < cxx20 || !type_maybe_constexpr_destructor (t)))
CLASSTYPE_LITERAL_P (t) = false;
else if (CLASSTYPE_LITERAL_P (t) && LAMBDA_TYPE_P (t))
CLASSTYPE_LITERAL_P (t) = (cxx_dialect >= cxx17);
@@ -5745,7 +5745,7 @@ explain_non_literal_class (tree t)
inform (UNKNOWN_LOCATION,
" %qT is a closure type, which is only literal in "
"C++17 and later", t);
- else if (cxx_dialect < cxx2a && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t))
+ else if (cxx_dialect < cxx20 && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t))
inform (UNKNOWN_LOCATION, " %q+T has a non-trivial destructor", t);
else if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)
&& !type_maybe_constexpr_destructor (t))
@@ -5893,7 +5893,7 @@ check_bases_and_members (tree t)
Again, other conditions for being an aggregate are checked
elsewhere. */
CLASSTYPE_NON_AGGREGATE (t)
- |= ((cxx_dialect < cxx2a
+ |= ((cxx_dialect < cxx20
? type_has_user_provided_or_explicit_constructor (t)
: TYPE_HAS_USER_CONSTRUCTOR (t))
|| TYPE_POLYMORPHIC_P (t));
@@ -7499,7 +7499,7 @@ finish_struct (tree t, tree attributes)
/* Remember current #pragma pack value. */
TYPE_PRECISION (t) = maximum_field_alignment;
- if (cxx_dialect < cxx2a)
+ if (cxx_dialect < cxx20)
{
if (!CLASSTYPE_NON_AGGREGATE (t)
&& type_has_user_provided_or_explicit_constructor (t))