From b04445d4a809eaf0460fd4f1f35b1a7d458c8c72 Mon Sep 17 00:00:00 2001 From: Jason Merrill <jason@redhat.com> Date: Wed, 13 May 2020 15:15:13 -0400 Subject: [PATCH] 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. --- gcc/c-family/ChangeLog | 10 ++ gcc/c-family/c-common.c | 2 +- gcc/c-family/c-common.h | 4 +- gcc/c-family/c-cppbuiltin.c | 4 +- gcc/c-family/c-opts.c | 28 ++--- gcc/c-family/c-ubsan.c | 4 +- gcc/c-family/c-warn.c | 4 +- gcc/c-family/c.opt | 8 +- gcc/cp/ChangeLog | 6 ++ gcc/cp/call.c | 10 +- gcc/cp/class.c | 10 +- gcc/cp/constexpr.c | 38 +++---- gcc/cp/constraint.cc | 2 +- gcc/cp/decl.c | 34 +++--- gcc/cp/init.c | 6 +- gcc/cp/lambda.c | 2 +- gcc/cp/lex.c | 2 +- gcc/cp/method.c | 18 ++-- gcc/cp/name-lookup.c | 40 +++---- gcc/cp/parser.c | 102 +++++++++--------- gcc/cp/pt.c | 20 ++-- gcc/cp/tree.c | 4 +- gcc/cp/typeck2.c | 8 +- gcc/dwarf2out.c | 2 +- gcc/testsuite/g++.dg/cpp2a/aggr1.C | 10 +- gcc/testsuite/g++.dg/cpp2a/array-conv11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv16.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv17.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/array-conv9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/attr-likely1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/attr-likely2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/attr-likely3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/attr-likely4.C | 2 +- .../g++.dg/cpp2a/class-deduction-aggr1.C | 2 +- .../g++.dg/cpp2a/class-deduction-aggr2.C | 2 +- .../g++.dg/cpp2a/class-deduction-alias1.C | 2 +- .../g++.dg/cpp2a/class-deduction-alias2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/comma1.C | 10 +- gcc/testsuite/g++.dg/cpp2a/comma2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/comma4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/comma5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-alias.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-class.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C | 2 +- .../g++.dg/cpp2a/concepts-complete1.C | 2 +- .../g++.dg/cpp2a/concepts-constrained-parm.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C | 2 +- .../g++.dg/cpp2a/concepts-decltype.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-inst1.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-inst2.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-inst3.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-inst4.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec1.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec2.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec3.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec4.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec5.C | 2 +- .../g++.dg/cpp2a/concepts-explicit-spec6.C | 2 +- .../g++.dg/cpp2a/concepts-feature-macro.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C | 2 +- .../g++.dg/cpp2a/concepts-inherit-ctor2.C | 2 +- .../g++.dg/cpp2a/concepts-inherit-ctor4.C | 2 +- .../g++.dg/cpp2a/concepts-inherit-ctor6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C | 2 +- .../g++.dg/cpp2a/concepts-locations1.C | 2 +- .../g++.dg/cpp2a/concepts-member-concept.C | 2 +- .../g++.dg/cpp2a/concepts-memfun-err.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C | 2 +- .../g++.dg/cpp2a/concepts-memtmpl1.C | 2 +- .../g++.dg/cpp2a/concepts-noexcept1.C | 2 +- .../g++.dg/cpp2a/concepts-partial-spec4.C | 2 +- .../g++.dg/cpp2a/concepts-partial-spec5.C | 2 +- .../g++.dg/cpp2a/concepts-partial-spec6.C | 2 +- .../g++.dg/cpp2a/concepts-placeholder1.C | 2 +- .../g++.dg/cpp2a/concepts-placeholder2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C | 2 +- .../g++.dg/cpp2a/concepts-pr67225-1.C | 2 +- .../g++.dg/cpp2a/concepts-pr67225-2.C | 2 +- .../g++.dg/cpp2a/concepts-pr67225-3.C | 2 +- .../g++.dg/cpp2a/concepts-pr67225-4.C | 2 +- .../g++.dg/cpp2a/concepts-pr67225-5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C | 2 +- .../g++.dg/cpp2a/concepts-pr68093-1.C | 2 +- .../g++.dg/cpp2a/concepts-pr68093-2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C | 2 +- .../g++.dg/cpp2a/concepts-recursive-sat1.C | 2 +- .../g++.dg/cpp2a/concepts-recursive-sat2.C | 2 +- .../g++.dg/cpp2a/concepts-recursive-sat3.C | 2 +- .../g++.dg/cpp2a/concepts-requires1.C | 2 +- .../g++.dg/cpp2a/concepts-requires10.C | 2 +- .../g++.dg/cpp2a/concepts-requires11.C | 2 +- .../g++.dg/cpp2a/concepts-requires12.C | 2 +- .../g++.dg/cpp2a/concepts-requires13.C | 2 +- .../g++.dg/cpp2a/concepts-requires14.C | 2 +- .../g++.dg/cpp2a/concepts-requires15.C | 2 +- .../g++.dg/cpp2a/concepts-requires16.C | 2 +- .../g++.dg/cpp2a/concepts-requires17.C | 2 +- .../g++.dg/cpp2a/concepts-requires18.C | 2 +- .../g++.dg/cpp2a/concepts-requires19.C | 2 +- .../g++.dg/cpp2a/concepts-requires2.C | 2 +- .../g++.dg/cpp2a/concepts-requires20.C | 2 +- .../g++.dg/cpp2a/concepts-requires21.C | 2 +- .../g++.dg/cpp2a/concepts-requires3.C | 2 +- .../g++.dg/cpp2a/concepts-requires4.C | 2 +- .../g++.dg/cpp2a/concepts-requires5.C | 2 +- .../g++.dg/cpp2a/concepts-requires6.C | 2 +- .../g++.dg/cpp2a/concepts-requires7.C | 2 +- .../g++.dg/cpp2a/concepts-requires8.C | 2 +- .../g++.dg/cpp2a/concepts-requires9.C | 2 +- .../g++.dg/cpp2a/concepts-return-req1.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm1.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm10.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm2.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm5.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm6.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm8.C | 2 +- .../g++.dg/cpp2a/concepts-template-parm9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts-using1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/concepts6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/cond-triv2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/consteval-void1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic1.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic10.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic11.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic12.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic13.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic14.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic15.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic16.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic17.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic18.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic2.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic3.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic4.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic5.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic6.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic7.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic8.C | 2 +- .../g++.dg/cpp2a/constexpr-dynamic9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C | 2 +- .../g++.dg/cpp2a/constexpr-typeid1.C | 2 +- .../g++.dg/cpp2a/constexpr-typeid2.C | 2 +- .../g++.dg/cpp2a/constexpr-typeid3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C | 2 +- .../g++.dg/cpp2a/constexpr-virtual14.C | 2 +- .../g++.dg/cpp2a/constexpr-virtual15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/constinit9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/desig13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/desig2.C | 6 +- .../g++.dg/cpp2a/destroying-delete1.C | 2 +- .../g++.dg/cpp2a/destroying-delete2.C | 2 +- .../g++.dg/cpp2a/destroying-delete3.C | 2 +- .../g++.dg/cpp2a/destroying-delete4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/explicit14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/explicit15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/inline-asm2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/inline-asm3.C | 2 +- .../g++.dg/cpp2a/is-constant-evaluated9.C | 2 +- .../g++.dg/cpp2a/lambda-generic-variadic20.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C | 2 +- .../g++.dg/cpp2a/lambda-pack-init1.C | 2 +- .../g++.dg/cpp2a/lambda-pack-init2.C | 2 +- .../g++.dg/cpp2a/lambda-pack-init4.C | 2 +- .../g++.dg/cpp2a/lambda-pack-init5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-this3.C | 16 +-- gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C | 2 +- ...ltiple-deleted-destroying-delete-error-1.C | 4 +- ...ltiple-deleted-destroying-delete-error-2.C | 4 +- .../g++.dg/cpp2a/nested-inline-ns2.C | 2 +- .../g++.dg/cpp2a/no_unique_address1.C | 2 +- .../g++.dg/cpp2a/nodiscard-constructor.c | 2 +- gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C | 2 +- .../g++.dg/cpp2a/nodiscard-reason-nonstring.C | 2 +- .../g++.dg/cpp2a/nodiscard-reason-only-one.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class16.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class17.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class18.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class19.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class20.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class21.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class22.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class23.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class24.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class25.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class26.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class27.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class28.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class29.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class30.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class31.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class32.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class33.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class34.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class35.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class36.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class37.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/nontype-class9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init16.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init18.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init19.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init20.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init21.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init22.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init23.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init24.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init25.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init26.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/paren-init9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/pr88534.C | 2 +- gcc/testsuite/g++.dg/cpp2a/pr88537.C | 2 +- gcc/testsuite/g++.dg/cpp2a/pr89913.C | 2 +- .../g++.dg/cpp2a/spaceship-constexpr1.C | 2 +- .../g++.dg/cpp2a/spaceship-constexpr2.C | 2 +- .../g++.dg/cpp2a/spaceship-decltype1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C | 2 +- .../g++.dg/cpp2a/spaceship-rewrite1.C | 2 +- .../g++.dg/cpp2a/spaceship-rewrite3.C | 8 +- .../g++.dg/cpp2a/spaceship-rewrite4.C | 2 +- .../g++.dg/cpp2a/spaceship-scalar1-neg.C | 2 +- .../g++.dg/cpp2a/spaceship-scalar1.C | 2 +- .../g++.dg/cpp2a/spaceship-scalar1a.C | 2 +- .../g++.dg/cpp2a/spaceship-scalar2.C | 2 +- .../g++.dg/cpp2a/spaceship-scalar3.C | 2 +- .../g++.dg/cpp2a/spaceship-sfinae1.C | 2 +- .../g++.dg/cpp2a/spaceship-synth-neg1.C | 2 +- .../g++.dg/cpp2a/spaceship-synth-neg2.C | 2 +- .../g++.dg/cpp2a/spaceship-synth-neg3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C | 2 +- .../g++.dg/cpp2a/spaceship-synth1a.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C | 2 +- .../g++.dg/cpp2a/spaceship-synth2a.C | 2 +- .../g++.dg/cpp2a/spaceship-synth2b.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C | 2 +- .../g++.dg/cpp2a/spaceship-synth3a.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/srcloc9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename1.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename10.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename11.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename12.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename13.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename14.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename15.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename16.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename17.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename3.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename4.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename5.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename6.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename7.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename8.C | 2 +- gcc/testsuite/g++.dg/cpp2a/typename9.C | 2 +- gcc/testsuite/g++.dg/cpp2a/ucn2.C | 10 +- .../g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C | 2 +- .../g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C | 2 +- .../g++.dg/cpp2a/udlit-class-nttp-ctad.C | 2 +- .../g++.dg/cpp2a/udlit-class-nttp-neg.C | 2 +- .../g++.dg/cpp2a/udlit-class-nttp-neg2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C | 2 +- gcc/testsuite/g++.dg/cpp2a/volatile1.C | 66 ++++++------ gcc/testsuite/g++.dg/cpp2a/volatile2.C | 2 +- gcc/testsuite/g++.dg/cpp2a/volatile4.C | 2 +- libcpp/ChangeLog | 5 + libcpp/charset.c | 2 +- libcpp/include/cpplib.h | 4 +- libcpp/init.c | 8 +- libcpp/lex.c | 6 +- libcpp/macro.c | 2 +- 467 files changed, 703 insertions(+), 682 deletions(-) diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 0be10ad7618f..7bd78c085dae 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,3 +1,13 @@ +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. + 2020-05-12 Eric Botcazou <ebotcazou@adacore.com> * c-ada-spec.c (dump_ads): Output pragma Warnings ("U"); on entry. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index d164f1e2f1ff..b1379faa412e 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -324,7 +324,7 @@ static bool nonnull_check_p (tree, unsigned HOST_WIDE_INT); ObjC is like C except that D_OBJC and D_CXX_OBJC are not set C++ --std=c++98: D_CONLY | D_CXX11 | D_CXX20 | D_OBJC C++ --std=c++11: D_CONLY | D_CXX20 | D_OBJC - C++ --std=c++2a: D_CONLY | D_OBJC + C++ --std=c++20: D_CONLY | D_OBJC ObjC++ is like C++ except that D_OBJC is not set If -fno-asm is used, D_ASM is added to the mask. If diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h index 3e26ca034ca3..7c1a6370aae5 100644 --- a/gcc/c-family/c-common.h +++ b/gcc/c-family/c-common.h @@ -720,8 +720,8 @@ enum cxx_dialect { cxx14, /* C++17 */ cxx17, - /* C++2a (C++20?) */ - cxx2a + /* C++20 */ + cxx20 }; /* The C++ dialect being used. C++98 is the default. */ diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index db91a36794a0..a7d65d63934b 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -988,7 +988,7 @@ c_cpp_builtins (cpp_reader *pfile) } if (cxx_dialect > cxx17) { - /* Set feature test macros for C++2a. */ + /* Set feature test macros for C++20. */ cpp_define (pfile, "__cpp_init_captures=201803L"); cpp_define (pfile, "__cpp_generic_lambdas=201707L"); cpp_define (pfile, "__cpp_designated_initializers=201707L"); @@ -1006,7 +1006,7 @@ c_cpp_builtins (cpp_reader *pfile) } if (flag_concepts) { - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) cpp_define (pfile, "__cpp_concepts=201907L"); else cpp_define (pfile, "__cpp_concepts=201507L"); diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c index 58ba0948e792..bd617d3df18e 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. */ } diff --git a/gcc/c-family/c-ubsan.c b/gcc/c-family/c-ubsan.c index 1d0a65b3b038..06a96399e64b 100644 --- a/gcc/c-family/c-ubsan.c +++ b/gcc/c-family/c-ubsan.c @@ -137,9 +137,9 @@ ubsan_instrument_shift (location_t loc, enum tree_code code, || maybe_ne (GET_MODE_BITSIZE (TYPE_MODE (type0)), TYPE_PRECISION (type0)) || !sanitize_flags_p (SANITIZE_SHIFT_BASE) - /* In C++2a and later, shifts are well defined except when + /* In C++20 and later, shifts are well defined except when the second operand is not within bounds. */ - || cxx_dialect >= cxx2a) + || cxx_dialect >= cxx20) ; /* For signed x << y, in C99/C11, the following: diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c index f6b3afc727c2..c32d8228b5c9 100644 --- a/gcc/c-family/c-warn.c +++ b/gcc/c-family/c-warn.c @@ -2562,7 +2562,7 @@ diagnose_mismatched_attributes (tree olddecl, tree newdecl) /* Warn if signed left shift overflows. We don't warn about left-shifting 1 into the sign bit in C++14; cf. <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3367.html#1457> - and don't warn for C++2a at all, as signed left shifts never + and don't warn for C++20 at all, as signed left shifts never overflow. LOC is a location of the shift; OP0 and OP1 are the operands. Return true if an overflow is detected, false otherwise. */ @@ -2578,7 +2578,7 @@ maybe_warn_shift_overflow (location_t loc, tree op0, tree op1) unsigned int prec0 = TYPE_PRECISION (type0); /* Left-hand operand must be signed. */ - if (TYPE_UNSIGNED (type0) || cxx_dialect >= cxx2a) + if (TYPE_UNSIGNED (type0) || cxx_dialect >= cxx20) return false; unsigned int min_prec = (wi::min_precision (wi::to_wide (op0), SIGNED) diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt index c49da99d3957..89a58282b3f5 100644 --- a/gcc/c-family/c.opt +++ b/gcc/c-family/c.opt @@ -2074,11 +2074,11 @@ C++ ObjC++ Conform to the ISO 2017 C++ standard. std=c++2a -C++ ObjC++ +C++ ObjC++ Alias(std=c++20) Undocumented Conform to the ISO 2020 C++ draft standard (experimental and incomplete support). std=c++20 -C++ ObjC++ Alias(std=c++2a) +C++ ObjC++ Conform to the ISO 2020 C++ draft standard (experimental and incomplete support). std=c11 @@ -2152,11 +2152,11 @@ C++ ObjC++ Conform to the ISO 2017 C++ standard with GNU extensions. std=gnu++2a -C++ ObjC++ +C++ ObjC++ Alias(std=gnu++20) Conform to the ISO 2020 C++ draft standard with GNU extensions (experimental and incomplete support). std=gnu++20 -C++ ObjC++ Alias(std=gnu++2a) +C++ ObjC++ Conform to the ISO 2020 C++ draft standard with GNU extensions (experimental and incomplete support). std=gnu11 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 7515827d7aea..11b3fdc0bc72 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +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. + 2020-05-12 Marek Polacek <polacek@redhat.com> PR c++/95074 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 85d670f52f90..940e65da6319 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -6041,7 +6041,7 @@ add_operator_candidates (z_candidate **candidates, /* Maybe add C++20 rewritten comparison candidates. */ tree_code rewrite_code = ERROR_MARK; - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && nargs == 2 && (OVERLOAD_TYPE_P (arg1_type) || OVERLOAD_TYPE_P (arg2_type))) switch (code) @@ -6599,7 +6599,7 @@ extract_call_expr (tree call) call = TREE_OPERAND (call, 0); if (TREE_CODE (call) == TARGET_EXPR) call = TARGET_EXPR_INITIAL (call); - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) switch (TREE_CODE (call)) { /* C++20 rewritten comparison operators. */ @@ -7280,7 +7280,7 @@ maybe_inform_about_fndecl_for_bogus_argument_init (tree fn, int argnum) static void maybe_warn_array_conv (location_t loc, conversion *c, tree expr) { - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) return; tree type = TREE_TYPE (expr); @@ -7292,7 +7292,7 @@ maybe_warn_array_conv (location_t loc, conversion *c, tree expr) if (conv_binds_to_array_of_unknown_bound (c)) pedwarn (loc, OPT_Wpedantic, "conversions to arrays of unknown bound " - "are only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "are only available with %<-std=c++20%> or %<-std=gnu++20%>"); } /* Perform the conversions in CONVS on the expression EXPR. FN and @@ -10251,7 +10251,7 @@ build_new_method_call_1 (tree instance, tree fns, vec<tree, va_gc> **args, the two. */ if (DECL_CONSTRUCTOR_P (fn) && !(flags & LOOKUP_ONLYCONVERTING) - && cxx_dialect >= cxx2a + && cxx_dialect >= cxx20 && CP_AGGREGATE_TYPE_P (basetype) && !user_args->is_empty ()) { diff --git a/gcc/cp/class.c b/gcc/cp/class.c index b66b8d4725d8..15f490da3fca 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)) diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c index 706d8a13d8ef..04faabc02583 100644 --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -768,7 +768,7 @@ static bool cx_check_missing_mem_inits (tree ctype, tree body, bool complain) { /* We allow uninitialized bases/fields in C++20. */ - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) return false; unsigned nelts = 0; @@ -1723,7 +1723,7 @@ modifying_const_object_error (tree expr, tree obj) static inline bool cxx_replaceable_global_alloc_fn (tree fndecl) { - return (cxx_dialect >= cxx2a + return (cxx_dialect >= cxx20 && IDENTIFIER_NEWDEL_OP_P (DECL_NAME (fndecl)) && CP_DECL_CONTEXT (fndecl) == global_namespace && (DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl) @@ -1736,7 +1736,7 @@ cxx_replaceable_global_alloc_fn (tree fndecl) static inline bool cxx_placement_new_fn (tree fndecl) { - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && IDENTIFIER_NEW_OP_P (DECL_NAME (fndecl)) && CP_DECL_CONTEXT (fndecl) == global_namespace && !DECL_IS_REPLACEABLE_OPERATOR_NEW_P (fndecl) @@ -1789,7 +1789,7 @@ is_std_allocator_allocate (tree fndecl) static inline bool cxx_dynamic_cast_fn_p (tree fndecl) { - return (cxx_dialect >= cxx2a + return (cxx_dialect >= cxx20 && id_equal (DECL_NAME (fndecl), "__dynamic_cast") && CP_DECL_CONTEXT (fndecl) == global_namespace); } @@ -2628,7 +2628,7 @@ cxx_eval_call_expression (const constexpr_ctx *ctx, tree t, of value-initializing it. (reduced_constant_expression_p is expected to take care of clearing the flag.) */ if (TREE_CODE (result) == CONSTRUCTOR - && (cxx_dialect < cxx2a + && (cxx_dialect < cxx20 || !DECL_CONSTRUCTOR_P (fun))) clear_no_implicit_zero (result); @@ -2661,11 +2661,11 @@ reduced_constant_expression_p (tree t) if (TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) /* An initialized vector would have a VECTOR_CST. */ return false; - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 /* An ARRAY_TYPE doesn't have any TYPE_FIELDS. */ && TREE_CODE (TREE_TYPE (t)) == ARRAY_TYPE) field = NULL_TREE; - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && TREE_CODE (TREE_TYPE (t)) == UNION_TYPE) { if (CONSTRUCTOR_NELTS (t) == 0) @@ -2784,13 +2784,13 @@ cxx_eval_check_shift_p (location_t loc, const constexpr_ctx *ctx, representable in the corresponding unsigned type of the result type, then that value, converted to the result type, is the resulting value; otherwise, the behavior is undefined. - For C++2a: + For C++20: The value of E1 << E2 is the unique value congruent to E1 x 2^E2 modulo 2^N, where N is the range exponent of the type of the result. */ if (code == LSHIFT_EXPR && !TYPE_UNSIGNED (lhstype) && cxx_dialect >= cxx11 - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) { if (tree_int_cst_sgn (lhs) == -1) { @@ -4803,7 +4803,7 @@ cxx_eval_store_expression (const constexpr_ctx *ctx, tree t, if (code == UNION_TYPE && CONSTRUCTOR_NELTS (*valp) && CONSTRUCTOR_ELT (*valp, 0)->index != index) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { if (!ctx->quiet) error_at (cp_expr_loc_or_input_loc (t), @@ -5422,7 +5422,7 @@ inline_asm_in_constexpr_error (location_t loc) auto_diagnostic_group d; error_at (loc, "inline assembly is not a constant expression"); inform (loc, "only unevaluated inline assembly is allowed in a " - "%<constexpr%> function in C++2a"); + "%<constexpr%> function in C++20"); } /* Attempt to reduce the expression T to a constant value. @@ -6582,7 +6582,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, type = TREE_TYPE (object); else { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return t; if (TREE_CODE (t) != CALL_EXPR && TREE_CODE (t) != AGGR_INIT_EXPR) return t; @@ -6595,7 +6595,7 @@ cxx_eval_outermost_constant_expr (tree t, bool allow_non_constant, is_consteval = true; } } - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && (TREE_CODE (t) == CALL_EXPR || TREE_CODE (t) == AGGR_INIT_EXPR || TREE_CODE (t) == TARGET_EXPR)) @@ -7422,7 +7422,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, /* Allow any built-in function; if the expansion isn't constant, we'll deal with that then. */ && !fndecl_built_in_p (fun) - /* In C++2a, replaceable global allocation functions + /* In C++20, replaceable global allocation functions are constant expressions. */ && (!cxx_replaceable_global_alloc_fn (fun) || TREE_CODE (t) != CALL_EXPR @@ -7844,12 +7844,12 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return false; case OBJ_TYPE_REF: - if (cxx_dialect >= cxx2a) - /* In C++2a virtual calls can be constexpr, don't give up yet. */ + if (cxx_dialect >= cxx20) + /* In C++20 virtual calls can be constexpr, don't give up yet. */ return true; else if (flags & tf_error) error_at (loc, - "virtual functions cannot be %<constexpr%> before C++2a"); + "virtual functions cannot be %<constexpr%> before C++20"); return false; case TYPEID_EXPR: @@ -7857,7 +7857,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, class type can be constexpr. */ { tree e = TREE_OPERAND (t, 0); - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && strict && !TYPE_P (e) && !type_dependent_expression_p (e) @@ -8153,7 +8153,7 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, bool now, return true; case COND_EXPR: - if (COND_EXPR_IS_VEC_DELETE (t) && cxx_dialect < cxx2a) + if (COND_EXPR_IS_VEC_DELETE (t) && cxx_dialect < cxx20) { if (flags & tf_error) error_at (loc, "%<delete[]%> is not a constant expression"); diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc index 4ad17f3b7d8c..3a17005232e5 100644 --- a/gcc/cp/constraint.cc +++ b/gcc/cp/constraint.cc @@ -1473,7 +1473,7 @@ finish_shorthand_constraint (tree decl, tree constr) The standard behavior cannot be overridden by -fconcepts-ts. */ bool variadic_concept_p = template_parameter_pack_p (proto); bool declared_pack_p = template_parameter_pack_p (decl); - bool apply_to_each_p = (cxx_dialect >= cxx2a) ? true : !variadic_concept_p; + bool apply_to_each_p = (cxx_dialect >= cxx20) ? true : !variadic_concept_p; /* Get the argument and overload used for the requirement and adjust it if we're going to expand later. */ diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 1b6a56723347..37ab48184864 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -928,7 +928,7 @@ static bool function_requirements_equivalent_p (tree newfn, tree oldfn) { /* In the concepts TS, the combined constraints are compared. */ - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { tree ci1 = get_constraints (oldfn); tree ci2 = get_constraints (newfn); @@ -5570,7 +5570,7 @@ grok_reference_init (tree decl, tree type, tree init, int flags) if (TREE_TYPE (init) == NULL_TREE && CP_AGGREGATE_TYPE_P (ttype) && !DECL_DECOMPOSITION_P (decl) - && (cxx_dialect >= cxx2a)) + && (cxx_dialect >= cxx20)) { /* We don't know yet if we should treat const A& r(1) as const A& r{1}. */ @@ -5896,7 +5896,7 @@ check_for_uninitialized_const_var (tree decl, bool constexpr_context_p, && (CP_TYPE_CONST_P (type) /* C++20 permits trivial default initialization in constexpr context (P1331R2). */ - || (cxx_dialect < cxx2a + || (cxx_dialect < cxx20 && (constexpr_context_p || var_in_constexpr_fn (decl)))) && !DECL_NONTRIVIALLY_INITIALIZED_P (decl)) @@ -5907,7 +5907,7 @@ check_for_uninitialized_const_var (tree decl, bool constexpr_context_p, bool show_notes = true; - if (!constexpr_context_p || cxx_dialect >= cxx2a) + if (!constexpr_context_p || cxx_dialect >= cxx20) { if (CP_TYPE_CONST_P (type)) { @@ -6721,7 +6721,7 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups) && TREE_TYPE (init) == NULL_TREE && TREE_CODE (type) == ARRAY_TYPE && !DECL_DECOMPOSITION_P (decl) - && (cxx_dialect >= cxx2a)) + && (cxx_dialect >= cxx20)) { /* [dcl.init.string] "An array of ordinary character type [...] can be initialized by an ordinary string literal [...] by an @@ -7186,14 +7186,14 @@ notice_forced_label_r (tree *tp, int *walk_subtrees, void *) return NULL_TREE; } -/* Return true if DECL has either a trivial destructor, or for C++2A +/* Return true if DECL has either a trivial destructor, or for C++20 is constexpr and has a constexpr destructor. */ static bool decl_maybe_constant_destruction (tree decl, tree type) { return (TYPE_HAS_TRIVIAL_DESTRUCTOR (type) - || (cxx_dialect >= cxx2a + || (cxx_dialect >= cxx20 && VAR_P (decl) && DECL_DECLARED_CONSTEXPR_P (decl) && type_has_constexpr_destructor (strip_array_types (type)))); @@ -7253,7 +7253,7 @@ omp_declare_variant_finalize_one (tree decl, tree attr) if (idk == CP_ID_KIND_UNQUALIFIED || idk == CP_ID_KIND_TEMPLATE_ID) { if (identifier_p (variant) - /* In C++2A, we may need to perform ADL for a template + /* In C++20, we may need to perform ADL for a template name. */ || (TREE_CODE (variant) == TEMPLATE_ID_EXPR && identifier_p (TREE_OPERAND (variant, 0)))) @@ -11648,13 +11648,13 @@ grokdeclarator (const cp_declarator *declarator, storage_class = sc_none; staticp = 0; } - if (constexpr_p && cxx_dialect < cxx2a) + if (constexpr_p && cxx_dialect < cxx20) { gcc_rich_location richloc (declspecs->locations[ds_virtual]); richloc.add_range (declspecs->locations[ds_constexpr]); pedwarn (&richloc, OPT_Wpedantic, "member %qD can be declared both " - "%<virtual%> and %<constexpr%> only in %<-std=c++2a%> or " - "%<-std=gnu++2a%>", dname); + "%<virtual%> and %<constexpr%> only in %<-std=c++20%> or " + "%<-std=gnu++20%>", dname); } } friendp = decl_spec_seq_has_spec_p (declspecs, ds_friend); @@ -11741,10 +11741,10 @@ grokdeclarator (const cp_declarator *declarator, if (consteval_p) error_at (declspecs->locations[ds_consteval], "structured " "binding declaration cannot be %qs", "consteval"); - if (thread_p && cxx_dialect < cxx2a) + if (thread_p && cxx_dialect < cxx20) pedwarn (declspecs->locations[ds_thread], 0, "structured binding declaration can be %qs only in " - "%<-std=c++2a%> or %<-std=gnu++2a%>", + "%<-std=c++20%> or %<-std=gnu++20%>", declspecs->gnu_thread_keyword_p ? "__thread" : "thread_local"); if (concept_p) @@ -11763,10 +11763,10 @@ grokdeclarator (const cp_declarator *declarator, "register"); break; case sc_static: - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (loc, 0, "structured binding declaration can be %qs only in " - "%<-std=c++2a%> or %<-std=gnu++2a%>", "static"); + "%<-std=c++20%> or %<-std=gnu++20%>", "static"); break; case sc_extern: error_at (loc, "structured binding declaration cannot be %qs", @@ -13206,11 +13206,11 @@ grokdeclarator (const cp_declarator *declarator, "a destructor cannot be %qs", "concept"); return error_mark_node; } - if (constexpr_p && cxx_dialect < cxx2a) + if (constexpr_p && cxx_dialect < cxx20) { error_at (declspecs->locations[ds_constexpr], "%<constexpr%> destructors only available" - " with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " with %<-std=c++20%> or %<-std=gnu++20%>"); return error_mark_node; } if (consteval_p) diff --git a/gcc/cp/init.c b/gcc/cp/init.c index e2e547afd963..56715d6be977 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -812,7 +812,7 @@ perform_member_init (tree member, tree init) if (init && TREE_CODE (init) == TREE_LIST && (DIRECT_LIST_INIT_P (TREE_VALUE (init)) /* FIXME C++20 parenthesized aggregate init (PR 92812). */ - || !(/* cxx_dialect >= cxx2a ? CP_AGGREGATE_TYPE_P (type) */ + || !(/* cxx_dialect >= cxx20 ? CP_AGGREGATE_TYPE_P (type) */ /* : */CLASS_TYPE_P (type)))) init = build_x_compound_expr_from_list (init, ELK_MEM_INIT, tf_warning_or_error); @@ -2909,7 +2909,7 @@ build_new_constexpr_heap_type (tree elt_type, tree cookie_size, tree full_size) static tree maybe_wrap_new_for_constexpr (tree alloc_call, tree elt_type, tree cookie_size) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return alloc_call; if (current_function_decl != NULL_TREE @@ -3611,7 +3611,7 @@ build_new_1 (vec<tree, va_gc> **placement, tree type, tree nelts, means allocate an int, and initialize it with 10. In C++20, also handle `new A(1, 2)'. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && AGGREGATE_TYPE_P (type) && (*init)->length () > 1) { diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index b55c2f85d27e..c94fe8edb8e2 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -702,7 +702,7 @@ add_default_capture (tree lambda_stack, tree id, tree initializer) initializer = convert_from_reference (var); /* Warn about deprecated implicit capture of this via [=]. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && this_capture_p && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda) == CPLD_COPY) { diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 37282d569734..8a69bc4f170d 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -229,7 +229,7 @@ init_reswords (void) if (cxx_dialect < cxx11) mask |= D_CXX11; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) mask |= D_CXX20; if (!flag_concepts) mask |= D_CXX_CONCEPTS; diff --git a/gcc/cp/method.c b/gcc/cp/method.c index 47f96aa845ec..3f8842bf4948 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) diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 9b68b15be602..4928b6075891 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -5635,19 +5635,19 @@ get_std_name_hint (const char *name) {"make_any", "<any>", cxx17}, /* <array>. */ {"array", "<array>", cxx11}, - {"to_array", "<array>", cxx2a}, + {"to_array", "<array>", cxx20}, /* <atomic>. */ {"atomic", "<atomic>", cxx11}, {"atomic_flag", "<atomic>", cxx11}, - {"atomic_ref", "<atomic>", cxx2a}, + {"atomic_ref", "<atomic>", cxx20}, /* <bitset>. */ {"bitset", "<bitset>", cxx11}, /* <compare> */ - {"weak_equality", "<compare>", cxx2a}, - {"strong_equality", "<compare>", cxx2a}, - {"partial_ordering", "<compare>", cxx2a}, - {"weak_ordering", "<compare>", cxx2a}, - {"strong_ordering", "<compare>", cxx2a}, + {"weak_equality", "<compare>", cxx20}, + {"strong_equality", "<compare>", cxx20}, + {"partial_ordering", "<compare>", cxx20}, + {"weak_ordering", "<compare>", cxx20}, + {"strong_ordering", "<compare>", cxx20}, /* <complex>. */ {"complex", "<complex>", cxx98}, {"complex_literals", "<complex>", cxx14}, @@ -5670,17 +5670,17 @@ get_std_name_hint (const char *name) {"ofstream", "<fstream>", cxx98}, /* <functional>. */ {"bind", "<functional>", cxx11}, - {"bind_front", "<functional>", cxx2a}, + {"bind_front", "<functional>", cxx20}, {"function", "<functional>", cxx11}, {"hash", "<functional>", cxx11}, {"invoke", "<functional>", cxx17}, {"mem_fn", "<functional>", cxx11}, {"not_fn", "<functional>", cxx17}, {"reference_wrapper", "<functional>", cxx11}, - {"unwrap_reference", "<functional>", cxx2a}, - {"unwrap_reference_t", "<functional>", cxx2a}, - {"unwrap_ref_decay", "<functional>", cxx2a}, - {"unwrap_ref_decay_t", "<functional>", cxx2a}, + {"unwrap_reference", "<functional>", cxx20}, + {"unwrap_reference_t", "<functional>", cxx20}, + {"unwrap_ref_decay", "<functional>", cxx20}, + {"unwrap_ref_decay_t", "<functional>", cxx20}, /* <future>. */ {"async", "<future>", cxx11}, {"future", "<future>", cxx11}, @@ -5763,7 +5763,7 @@ get_std_name_hint (const char *name) {"shared_mutex", "<shared_mutex>", cxx17}, {"shared_timed_mutex", "<shared_mutex>", cxx14}, /* <source_location>. */ - {"source_location", "<source_location>", cxx2a}, + {"source_location", "<source_location>", cxx20}, /* <sstream>. */ {"basic_stringbuf", "<sstream>", cxx98}, {"basic_istringstream", "<sstream>", cxx98}, @@ -5778,7 +5778,7 @@ get_std_name_hint (const char *name) {"basic_string", "<string>", cxx98}, {"string", "<string>", cxx98}, {"wstring", "<string>", cxx98}, - {"u8string", "<string>", cxx2a}, + {"u8string", "<string>", cxx20}, {"u16string", "<string>", cxx11}, {"u32string", "<string>", cxx11}, /* <string_view>. */ @@ -5804,10 +5804,10 @@ get_std_name_hint (const char *name) {"enable_if_t", "<type_traits>", cxx14}, {"invoke_result", "<type_traits>", cxx17}, {"invoke_result_t", "<type_traits>", cxx17}, - {"remove_cvref", "<type_traits>", cxx2a}, - {"remove_cvref_t", "<type_traits>", cxx2a}, - {"type_identity", "<type_traits>", cxx2a}, - {"type_identity_t", "<type_traits>", cxx2a}, + {"remove_cvref", "<type_traits>", cxx20}, + {"remove_cvref_t", "<type_traits>", cxx20}, + {"type_identity", "<type_traits>", cxx20}, + {"type_identity_t", "<type_traits>", cxx20}, {"void_t", "<type_traits>", cxx17}, {"conjunction", "<type_traits>", cxx17}, {"conjunction_v", "<type_traits>", cxx17}, @@ -5859,8 +5859,8 @@ get_cxx_dialect_name (enum cxx_dialect dialect) return "C++14"; case cxx17: return "C++17"; - case cxx2a: - return "C++2a"; + case cxx20: + return "C++20"; } } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index f1ddef220fec..bc1ee21e8ce9 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -1809,7 +1809,7 @@ enum constexpr. */ CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR = 0x8, /* When parsing a decl-specifier-seq, only allow mutable, constexpr or - for C++2A consteval. */ + for C++20 consteval. */ CP_PARSER_FLAGS_ONLY_MUTABLE_OR_CONSTEXPR = 0x10, /* When parsing a decl-specifier-seq, allow missing typename. */ CP_PARSER_FLAGS_TYPENAME_OPTIONAL = 0x20, @@ -3369,11 +3369,11 @@ cp_parser_diagnose_invalid_type_name (cp_parser *parser, tree id, && id_equal (id, "thread_local")) inform (location, "C++11 %<thread_local%> only available with " "%<-std=c++11%> or %<-std=gnu++11%>"); - else if (cxx_dialect < cxx2a && id == ridpointers[(int)RID_CONSTINIT]) + else if (cxx_dialect < cxx20 && id == ridpointers[(int)RID_CONSTINIT]) inform (location, "C++20 %<constinit%> only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); else if (!flag_concepts && id == ridpointers[(int)RID_CONCEPT]) - inform (location, "%<concept%> only available with %<-std=c++2a%> or " + inform (location, "%<concept%> only available with %<-std=c++20%> or " "%<-fconcepts%>"); else if (!flag_concepts && id == ridpointers[(int)RID_REQUIRES]) inform (location, "%<requires%> only available with %<-std=c++2a%> or " @@ -7362,7 +7362,7 @@ cp_parser_postfix_expression (cp_parser *parser, bool address_p, bool cast_p, || idk == CP_ID_KIND_TEMPLATE_ID) { if (identifier_p (postfix_expression) - /* In C++2A, we may need to perform ADL for a template + /* In C++20, we may need to perform ADL for a template name. */ || (TREE_CODE (postfix_expression) == TEMPLATE_ID_EXPR && identifier_p (TREE_OPERAND (postfix_expression, 0)))) @@ -10510,7 +10510,7 @@ cp_parser_lambda_expression (cp_parser* parser) LAMBDA_EXPR_LOCATION (lambda_expr) = token->location; - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) /* C++20 allows lambdas in unevaluated context. */; else if (cp_unevaluated_operand) { @@ -10518,7 +10518,7 @@ cp_parser_lambda_expression (cp_parser* parser) { error_at (LAMBDA_EXPR_LOCATION (lambda_expr), "lambda-expression in unevaluated context" - " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " only available with %<-std=c++20%> or %<-std=gnu++20%>"); token->error_reported = true; } ok = false; @@ -10528,7 +10528,7 @@ cp_parser_lambda_expression (cp_parser* parser) if (!token->error_reported) { error_at (token->location, "lambda-expression in template-argument" - " only available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + " only available with %<-std=c++20%> or %<-std=gnu++20%>"); token->error_reported = true; } ok = false; @@ -10714,7 +10714,7 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is_keyword (parser->lexer, RID_THIS)) { location_t loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr) == CPLD_COPY) pedwarn (loc, 0, "explicit by-copy capture of %<this%> redundant " "with by-copy capture default"); @@ -10774,9 +10774,9 @@ cp_parser_lambda_introducer (cp_parser* parser, tree lambda_expr) if (cp_lexer_next_token_is (parser->lexer, CPP_ELLIPSIS)) { ellipsis_loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (ellipsis_loc, 0, "pack init-capture only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); init_pack_expansion = true; } @@ -10993,10 +10993,10 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) pedwarn (parser->lexer->next_token->location, 0, "lambda templates are only available with " "%<-std=c++14%> or %<-std=gnu++14%>"); - else if (cxx_dialect < cxx2a) + else if (cxx_dialect < cxx20) pedwarn (parser->lexer->next_token->location, OPT_Wpedantic, "lambda templates are only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); @@ -11030,7 +11030,7 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) bool is_consteval = false; /* For C++20, before parsing the parameter list check if there is a consteval specifier in the corresponding decl-specifier-seq. */ - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) { for (size_t n = cp_parser_skip_balanced_tokens (parser, 1); cp_lexer_nth_token_is (parser->lexer, n, CPP_KEYWORD); n++) @@ -12970,11 +12970,11 @@ cp_parser_init_statement (cp_parser *parser, tree *decl) /* That didn't work, try to parse it as an expression-statement. */ cp_parser_expression_statement (parser, NULL_TREE); - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { pedwarn (cp_lexer_peek_token (parser->lexer)->location, 0, "range-based %<for%> loops with initializer only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); *decl = error_mark_node; } } @@ -14486,7 +14486,7 @@ cp_parser_storage_class_specifier_opt (cp_parser* parser) virtual explicit - C++2A Extension: + C++20 Extension: explicit(constant-expression) Returns an IDENTIFIER_NODE corresponding to the keyword used. @@ -14530,10 +14530,10 @@ cp_parser_function_specifier_opt (cp_parser* parser, parser->type_definition_forbidden_message = G_("types may not be defined in explicit-specifier"); - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (token->location, 0, - "%<explicit(bool)%> only available with %<-std=c++2a%> " - "or %<-std=gnu++2a%>"); + "%<explicit(bool)%> only available with %<-std=c++20%> " + "or %<-std=gnu++20%>"); /* Parse the constant-expression. */ expr = cp_parser_constant_expression (parser); @@ -16682,12 +16682,12 @@ cp_parser_template_id (cp_parser *parser, /* This didn't go well. */ if (TREE_CODE (templ) == FUNCTION_DECL) { - /* C++2A says that "function-name < a;" is now ill-formed. */ + /* C++20 says that "function-name < a;" is now ill-formed. */ if (cp_parser_error_occurred (parser)) { error_at (token->location, "invalid template-argument-list"); inform (token->location, "function name as the left hand " - "operand of %<<%> is ill-formed in C++2a; wrap the " + "operand of %<<%> is ill-formed in C++20; wrap the " "function name in %<()%>"); } else @@ -17391,7 +17391,7 @@ cp_parser_template_argument (cp_parser* parser) else { /* In C++20, we can encounter a braced-init-list. */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && cp_lexer_next_token_is (parser->lexer, CPP_OPEN_BRACE)) { bool expr_non_constant_p; @@ -18112,7 +18112,7 @@ cp_parser_simple_type_specifier (cp_parser* parser, { bool qualified_p; bool global_p; - const bool typename_p = (cxx_dialect >= cxx2a + const bool typename_p = (cxx_dialect >= cxx20 && (flags & CP_PARSER_FLAGS_TYPENAME_OPTIONAL)); /* Don't gobble tokens or issue error messages if this is an @@ -18378,7 +18378,7 @@ cp_parser_placeholder_type_specifier (cp_parser *parser, location_t loc, /* As per the standard, require auto or decltype(auto), except in some cases (template parameter lists, -fconcepts-ts enabled). */ cp_token *placeholder = NULL, *close_paren = NULL; - if (cxx_dialect >= cxx2a) + if (cxx_dialect >= cxx20) { if (cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO)) placeholder = cp_lexer_consume_token (parser->lexer); @@ -19631,10 +19631,10 @@ cp_parser_namespace_definition (cp_parser* parser) RID_INLINE); if (nested_inline_p && nested_definition_count != 0) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (cp_lexer_peek_token (parser->lexer)->location, OPT_Wpedantic, "nested inline namespace definitions only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); cp_lexer_consume_token (parser->lexer); } @@ -20187,13 +20187,13 @@ cp_parser_asm_definition (cp_parser* parser) /* Look for the `asm' keyword. */ cp_parser_require_keyword (parser, RID_ASM, RT_ASM); - /* In C++2a, unevaluated inline assembly is permitted in constexpr + /* In C++20, unevaluated inline assembly is permitted in constexpr functions. */ if (parser->in_function_body && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && (cxx_dialect < cxx2a)) + && (cxx_dialect < cxx20)) pedwarn (asm_loc, 0, "%<asm%> in %<constexpr%> function only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); /* Handle the asm-qualifier-list. */ location_t volatile_loc = UNKNOWN_LOCATION; @@ -21600,7 +21600,7 @@ cp_parser_direct_declarator (cp_parser* parser, - it is a decl-specifier of the decl-specifier-seq of a parameter-declaration in a declarator of a function or function template declaration, ... */ - if (cxx_dialect >= cxx2a + if (cxx_dialect >= cxx20 && (flags & CP_PARSER_FLAGS_TYPENAME_OPTIONAL) && declarator->kind == cdk_id && !at_class_scope_p () @@ -23082,16 +23082,16 @@ cp_parser_ctor_initializer_opt_and_function_body (cp_parser *parser, if (in_function_try_block && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) { if (DECL_CONSTRUCTOR_P (current_function_decl)) pedwarn (input_location, 0, "function-try-block body of %<constexpr%> constructor only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); else pedwarn (input_location, 0, "function-try-block body of %<constexpr%> function only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); } /* Begin the function body. */ @@ -23351,7 +23351,7 @@ cp_parser_array_designator_p (cp_parser *parser) initializer-clause ... [opt] initializer-list , initializer-clause ... [opt] - C++2A Extension: + C++20 Extension: designated-initializer-list: designated-initializer-clause @@ -23403,8 +23403,8 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, bool clause_non_constant_p; location_t loc = cp_lexer_peek_token (parser->lexer)->location; - /* Handle the C++2A syntax, '. id ='. */ - if ((cxx_dialect >= cxx2a + /* Handle the C++20 syntax, '. id ='. */ + if ((cxx_dialect >= cxx20 || cp_parser_allow_gnu_extensions_p (parser)) && cp_lexer_next_token_is (parser->lexer, CPP_DOT) && cp_lexer_peek_nth_token (parser->lexer, 2)->type == CPP_NAME @@ -23412,10 +23412,10 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, || (cp_lexer_peek_nth_token (parser->lexer, 3)->type == CPP_OPEN_BRACE))) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) pedwarn (loc, OPT_Wpedantic, "C++ designated initializers only available with " - "%<-std=c++2a%> or %<-std=gnu++2a%>"); + "%<-std=c++20%> or %<-std=gnu++20%>"); /* Consume the `.'. */ cp_lexer_consume_token (parser->lexer); /* Consume the identifier. */ @@ -23482,7 +23482,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, first_designator = designator; first_p = false; } - else if (cxx_dialect >= cxx2a + else if (cxx_dialect >= cxx20 && first_designator != error_mark_node && (!first_designator != !designator)) { @@ -23490,7 +23490,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, "or none of them should be"); first_designator = error_mark_node; } - else if (cxx_dialect < cxx2a && !first_designator) + else if (cxx_dialect < cxx20 && !first_designator) first_designator = designator; /* Parse the initializer. */ @@ -23509,7 +23509,7 @@ cp_parser_initializer_list (cp_parser* parser, bool* non_constant_p, /* Consume the `...'. */ cp_lexer_consume_token (parser->lexer); - if (designator && cxx_dialect >= cxx2a) + if (designator && cxx_dialect >= cxx20) error_at (loc, "%<...%> not allowed in designated initializer list"); @@ -25111,7 +25111,7 @@ cp_parser_member_declaration (cp_parser* parser) width = cp_parser_constant_expression (parser, false, NULL, cxx_dialect >= cxx11); - /* In C++2A and as extension for C++11 and above we allow + /* In C++20 and as extension for C++11 and above we allow default member initializers for bit-fields. */ initializer = NULL_TREE; if (cxx_dialect >= cxx11 @@ -25121,12 +25121,12 @@ cp_parser_member_declaration (cp_parser* parser) { location_t loc = cp_lexer_peek_token (parser->lexer)->location; - if (cxx_dialect < cxx2a + if (cxx_dialect < cxx20 && identifier != NULL_TREE) pedwarn (loc, 0, "default member initializers for bit-fields " - "only available with %<-std=c++2a%> or " - "%<-std=gnu++2a%>"); + "only available with %<-std=c++20%> or " + "%<-std=gnu++20%>"); initializer = cp_parser_save_nsdmi (parser); if (identifier == NULL_TREE) @@ -26084,10 +26084,10 @@ cp_parser_try_block (cp_parser* parser) cp_parser_require_keyword (parser, RID_TRY, RT_TRY); if (parser->in_function_body && DECL_DECLARED_CONSTEXPR_P (current_function_decl) - && cxx_dialect < cxx2a) + && cxx_dialect < cxx20) pedwarn (input_location, 0, "%<try%> in %<constexpr%> function only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); try_block = begin_try_block (); cp_parser_compound_statement (parser, NULL, BCS_TRY_BLOCK, false); @@ -27705,7 +27705,7 @@ cp_parser_requires_clause_opt (cp_parser *parser, bool lambda_p) { error_at (cp_lexer_peek_token (parser->lexer)->location, "%<requires%> only available with " - "%<-std=c++2a%> or %<-fconcepts%>"); + "%<-std=c++20%> or %<-fconcepts%>"); /* Parse and discard the requires-clause. */ cp_lexer_consume_token (parser->lexer); cp_parser_constraint_expression (parser); @@ -28035,7 +28035,7 @@ cp_parser_compound_requirement (cp_parser *parser) bool saved_result_type_constraint_p = parser->in_result_type_constraint_p; parser->in_result_type_constraint_p = true; - /* C++2a allows either a type-id or a type-constraint. Parsing + /* C++20 allows either a type-id or a type-constraint. Parsing a type-id will subsume the parsing for a type-constraint but allow for more syntactic forms (e.g., const C<T>*). */ type = cp_parser_trailing_type_id (parser); @@ -29049,7 +29049,7 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, else if (cxx_dialect >= cxx11 && cp_lexer_next_token_is_keyword (parser->lexer, RID_USING)) decl = cp_parser_alias_declaration (parser); - else if (cxx_dialect >= cxx2a /* Implies flag_concept. */ + else if (cxx_dialect >= cxx20 /* Implies flag_concept. */ && cp_lexer_next_token_is_keyword (parser->lexer, RID_CONCEPT) && !cp_lexer_nth_token_is_keyword (parser->lexer, 2, RID_BOOL)) /* Allow 'concept bool' to be handled as per the TS. */ diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 7911293571e2..f0cb7a2acb7d 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3490,7 +3490,7 @@ template_heads_equivalent_p (const_tree tmpl1, const_tree tmpl2) tree parms2 = DECL_TEMPLATE_PARMS (tmpl2); /* Don't change the matching rules for pre-C++20. */ - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return comp_template_parms (parms1, parms2); /* ... have the same number of template parameters, and their @@ -5776,7 +5776,7 @@ push_template_decl_real (tree decl, bool is_friend) else if (VAR_P (decl)) /* C++14 variable template. */; else if (TREE_CODE (decl) == CONCEPT_DECL) - /* C++2a concept definitions. */; + /* C++20 concept definitions. */; else { error ("template declaration of %q#D", decl); @@ -9070,7 +9070,7 @@ coerce_innermost_template_parms (tree parms, static bool class_nttp_const_wrapper_p (tree t) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return false; return (TREE_CODE (t) == VIEW_CONVERT_EXPR && CP_TYPE_CONST_P (TREE_TYPE (t)) @@ -26137,11 +26137,11 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) return false; else if (TREE_CODE (type) == TEMPLATE_TYPE_PARM) { - if (CLASS_PLACEHOLDER_TEMPLATE (type) && cxx_dialect < cxx2a) + if (CLASS_PLACEHOLDER_TEMPLATE (type) && cxx_dialect < cxx20) { if (complain & tf_error) error ("non-type template parameters of deduced class type only " - "available with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "available with %<-std=c++20%> or %<-std=gnu++20%>"); return true; } return false; @@ -26159,11 +26159,11 @@ invalid_nontype_parm_type_p (tree type, tsubst_flags_t complain) return false; else if (CLASS_TYPE_P (type)) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) { if (complain & tf_error) error ("non-type template parameters of class type only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); return true; } if (dependent_type_p (type)) @@ -28383,7 +28383,7 @@ is_spec_or_derived (tree etype, tree tmpl) static tree maybe_aggr_guide (tree tmpl, tree init, vec<tree,va_gc> *args) { - if (cxx_dialect < cxx2a) + if (cxx_dialect < cxx20) return NULL_TREE; if (init == NULL_TREE) @@ -28750,12 +28750,12 @@ do_class_deduction (tree ptype, tree tmpl, tree init, error ("non-deducible template %qT used without template arguments", tmpl); return error_mark_node; } - else if (cxx_dialect < cxx2a && DECL_ALIAS_TEMPLATE_P (tmpl)) + else if (cxx_dialect < cxx20 && DECL_ALIAS_TEMPLATE_P (tmpl)) { /* This doesn't affect conforming C++17 code, so just pedwarn. */ if (complain & tf_warning_or_error) pedwarn (input_location, 0, "alias template deduction only available " - "with %<-std=c++2a%> or %<-std=gnu++2a%>"); + "with %<-std=c++20%> or %<-std=gnu++20%>"); } if (init && TREE_TYPE (init) == ptype) diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index d526a6311e06..2090cbf7da76 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -691,7 +691,7 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain) it can produce a { }. */ if (BRACE_ENCLOSED_INITIALIZER_P (init)) { - gcc_assert (cxx_dialect >= cxx2a); + gcc_assert (cxx_dialect >= cxx20); return finish_compound_literal (type, init, complain); } @@ -4599,7 +4599,7 @@ handle_nodiscard_attribute (tree *node, tree name, tree args, return NULL_TREE; } -/* Handle a C++2a "no_unique_address" attribute; arguments as in +/* Handle a C++20 "no_unique_address" attribute; arguments as in struct attribute_spec.handler. */ static tree handle_no_unique_addr_attribute (tree* node, diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index d407e4cbfa48..af84c257e963 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -1102,7 +1102,7 @@ check_narrowing (tree type, tree init, tsubst_flags_t complain, return ok; } -/* True iff TYPE is a C++2a "ordinary" character type. */ +/* True iff TYPE is a C++20 "ordinary" character type. */ bool ordinary_char_type_p (tree type) @@ -2236,7 +2236,7 @@ build_m_component_ref (tree datum, tree component, tsubst_flags_t complain) { /* 5.5/6: In a .* expression whose object expression is an rvalue, the program is ill-formed if the second operand is a pointer to member - function with ref-qualifier & (for C++2A: unless its cv-qualifier-seq + function with ref-qualifier & (for C++20: unless its cv-qualifier-seq is const). In a .* expression whose object expression is an lvalue, the program is ill-formed if the second operand is a pointer to member function with ref-qualifier &&. */ @@ -2261,12 +2261,12 @@ build_m_component_ref (tree datum, tree component, tsubst_flags_t complain) "an lvalue", ptrmem_type); return error_mark_node; } - else if (cxx_dialect < cxx2a) + else if (cxx_dialect < cxx20) { if (complain & tf_warning_or_error) pedwarn (input_location, OPT_Wpedantic, "pointer-to-member-function type %qT requires " - "an lvalue before C++2a", ptrmem_type); + "an lvalue before C++20", ptrmem_type); else return error_mark_node; } diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 396446f7670a..fad5eb4c2e50 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -13609,7 +13609,7 @@ generic_parameter_die (tree parm, tree arg, dw_die_ref tmpl_die = NULL; const char *name = NULL; - /* C++2a accepts class literals as template parameters, and var + /* C++20 accepts class literals as template parameters, and var decls with initializers represent them. The VAR_DECLs would be rejected, but we can take the DECL_INITIAL constructor and attempt to expand it. */ diff --git a/gcc/testsuite/g++.dg/cpp2a/aggr1.C b/gcc/testsuite/g++.dg/cpp2a/aggr1.C index 73a257cead9d..ea599237ab18 100644 --- a/gcc/testsuite/g++.dg/cpp2a/aggr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/aggr1.C @@ -1,15 +1,15 @@ // { dg-do compile { target c++11 } } struct A { - A () = delete; // { dg-message "declared here" "" { target c++2a } } + A () = delete; // { dg-message "declared here" "" { target c++20 } } }; struct B { B () = default; int b = 0; }; struct C { - C (C&&) = default; // { dg-message "candidate" "" { target c++2a } } + C (C&&) = default; // { dg-message "candidate" "" { target c++20 } } int c, d; }; -A a {}; // { dg-error "use of deleted function" "" { target c++2a } } -B b = {1}; // { dg-error "could not convert" "" { target { c++11_only || c++2a } } } -C *c = new C {2, 3}; // { dg-error "no matching function for call to" "" { target c++2a } } +A a {}; // { dg-error "use of deleted function" "" { target c++20 } } +B b = {1}; // { dg-error "could not convert" "" { target { c++11_only || c++20 } } } +C *c = new C {2, 3}; // { dg-error "no matching function for call to" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv11.C b/gcc/testsuite/g++.dg/cpp2a/array-conv11.C index a072b29191dc..04a531c356ea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv11.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv11.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wpedantic" } // Test flexible array member. Here we're binding int[] to int[]. This worked diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv12.C b/gcc/testsuite/g++.dg/cpp2a/array-conv12.C index 1156ea32df55..b0dd81984bbc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv12.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv12.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wpedantic" } int arr[1] = { 42 }; diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv13.C b/gcc/testsuite/g++.dg/cpp2a/array-conv13.C index 9908b7e91189..96b65a59795e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv13.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv13.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> void foo(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv14.C b/gcc/testsuite/g++.dg/cpp2a/array-conv14.C index 793e85d7b1c9..8406b999dd5c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv14.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv14.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void f(const int(*)[]); void fb(const int(*)[3]); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv15.C b/gcc/testsuite/g++.dg/cpp2a/array-conv15.C index 033a74683a71..17f917af7373 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv15.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv15.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int f(int, int const(&)[2]) { return 1; } int f(double, int const(&)[2]) { return 2; } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv16.C b/gcc/testsuite/g++.dg/cpp2a/array-conv16.C index bfb39d1c12c9..1413971aaa22 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv16.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv16.C @@ -1,5 +1,5 @@ // PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using P = int *(*)[3]; using S = const int *const (*)[]; diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv17.C b/gcc/testsuite/g++.dg/cpp2a/array-conv17.C index 3313ed466fba..a879099d542c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv17.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv17.C @@ -1,5 +1,5 @@ // PR c++/91364 - P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // As conversion/qual1.C, but with []. diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv2.C b/gcc/testsuite/g++.dg/cpp2a/array-conv2.C index 5245d830f1f3..37e9e0546f69 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv2.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { A(); diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv3.C b/gcc/testsuite/g++.dg/cpp2a/array-conv3.C index 3d92b4012471..1ce041e8f2ab 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv3.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv3.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv4.C b/gcc/testsuite/g++.dg/cpp2a/array-conv4.C index 979c69b05552..3f6f92c1fedf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv4.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv4.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv5.C b/gcc/testsuite/g++.dg/cpp2a/array-conv5.C index 34678f5cead3..e1058cd83d54 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv5.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv5.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of list-initialization sequences int b(int (&&)[] ) { return 1; } // #1 diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv6.C b/gcc/testsuite/g++.dg/cpp2a/array-conv6.C index c2389c822733..dc1064005fc6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv6.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv6.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Ranking of reference initialization conversions diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv7.C b/gcc/testsuite/g++.dg/cpp2a/array-conv7.C index 07c709ff10f2..1ea1a69c2ff6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv7.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv7.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int f(int const(&)[]) { return 1; } int f(int const(&)[2]) { return 2; } diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv8.C b/gcc/testsuite/g++.dg/cpp2a/array-conv8.C index 635c7679a21b..77a07ea038d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv8.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv8.C @@ -1,5 +1,5 @@ // PR c++/69531 - DR 1307, Overload resolution based on size of array init-list. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Example from [over.ics.rank]. int f(int (&&)[] ) { return 1; } // #1 diff --git a/gcc/testsuite/g++.dg/cpp2a/array-conv9.C b/gcc/testsuite/g++.dg/cpp2a/array-conv9.C index 63318c53e091..4081cce57ba6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/array-conv9.C +++ b/gcc/testsuite/g++.dg/cpp2a/array-conv9.C @@ -1,5 +1,5 @@ // PR c++/91364 - Implement P0388R4: Permit conversions to arrays of unknown bound. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int arr[1]; extern int arr2[]; diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C index 43de249bd5af..03b210d5f2d1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options -fdump-tree-gimple } // { dg-final { scan-tree-dump-times "hot label" 5 "gimple" } } // { dg-final { scan-tree-dump-times "cold label" 3 "gimple" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C index 6c59610528eb..ee178dec9c55 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } bool b; int main() diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C index bb1265ddb6e4..6e37dbdc9801 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } [[likely]] void f() { } // { dg-warning "function" } diff --git a/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C b/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C index bf0dc4c5d4ee..0a96edc31832 100644 --- a/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C +++ b/gcc/testsuite/g++.dg/cpp2a/attr-likely4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int a, b, c; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C index 61ba65a1333d..f7bd72b7f45b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C @@ -1,5 +1,5 @@ // Testcase from P1816R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C index 896554f610a5..2fdf4e8f89f0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C @@ -1,5 +1,5 @@ // Test that non-aggregates don't get the aggregate deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-prune-output "no matching function" } struct A { A(); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C index ed47eb38f1b5..6890d0a1f898 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C @@ -1,5 +1,5 @@ // Testcase from P1814R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> struct identity { using type = T; }; template <class T> using identity_t = typename identity<T>::type; diff --git a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C index d855f7d11ce9..07876a4a4968 100644 --- a/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C +++ b/gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C @@ -1,6 +1,6 @@ // Test that a non-template deduction guide that doesn't match the alias is // ignored. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> struct identity { using type = T; }; template <class T> using identity_t = typename identity<T>::type; diff --git a/gcc/testsuite/g++.dg/cpp2a/comma1.C b/gcc/testsuite/g++.dg/cpp2a/comma1.C index 8ffe5d74e618..d9c140db23a3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma1.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma1.C @@ -8,19 +8,19 @@ struct S { void fn (int *a, int b, int c) { - a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[b,c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(b,c)]; - a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[(void) b, c]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[((void) b, c)]; - a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[(void) b, (void) c, (void) b, b]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[((void) b, (void) c, (void) b, b)]; - a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[S(), 10]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(S(), 10)]; a[int{(1,2)}]; - a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++2a } } + a[int{(1,2)}, int{}]; // { dg-warning "top-level comma expression in array subscript is deprecated" "" { target c++20 } } a[(int{(1,2)}, int{})]; } diff --git a/gcc/testsuite/g++.dg/cpp2a/comma2.C b/gcc/testsuite/g++.dg/cpp2a/comma2.C index 15fd26ab400f..995944f500ef 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma2.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma2.C @@ -1,5 +1,5 @@ // PR c++/91338 - P1161R3: Deprecate a[b,c]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-comma-subscript" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/comma4.C b/gcc/testsuite/g++.dg/cpp2a/comma4.C index 23183ad7bc21..0d149c7a9af7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma4.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma4.C @@ -1,5 +1,5 @@ // PR c++/91338 - P1161R3: Deprecate a[b,c]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-deprecated" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/comma5.C b/gcc/testsuite/g++.dg/cpp2a/comma5.C index 68d19c09ccf5..acf5d43ad5d7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/comma5.C +++ b/gcc/testsuite/g++.dg/cpp2a/comma5.C @@ -1,5 +1,5 @@ // PR c++/91391 - bogus -Wcomma-subscript warning. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T, typename U> int foo(T t, U u) { return t + u; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C index 862879169fb7..b8089679772a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C index 02e960ad40a3..2ac9ae2ff727 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> struct A { }; template <typename T> concept int_type = __is_same_as (T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C index d37ce6a51e88..26b3d4a2cbbf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> struct A { }; template <typename T> concept int_type = __is_same_as (T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C index 907b0c2e3575..a565de664128 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C @@ -1,5 +1,5 @@ // PR c++/93377 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-class.C b/gcc/testsuite/g++.dg/cpp2a/concepts-class.C index aca5c44c48f4..b50cb421b3b1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-class.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-class.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C index b090c3a3719f..d13100b96f9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <cmath> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C index 25c4ca064ce1..63f36965f006 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept has_mem_type = requires { typename T::type; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C b/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C index bb7e31d8b6c5..18564c8da13f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C index 821042f44ee0..f61f2602b788 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C @@ -1,5 +1,5 @@ // PR c++/94597 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename b, typename c> concept d = requires(b e) { e.operator c(); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C b/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C index db3cfdf3cb27..13733c645f3f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Tests constrained decltype(auto). diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C b/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C index 91eefee602a5..800476910047 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C @@ -1,5 +1,5 @@ // PR c++/66092 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T, typename U, typename... Args> concept Similar = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C index 14d994c9b041..5cbf64a8cd3d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-final { scan-assembler "_Z1gI1XEvT_" } } // { dg-final { scan-assembler "_Z1gI1YEvT_" } } // { dg-final { scan-assembler "_Z1gIiEvT_" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C index 6074bc786826..5756b0d73a6c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C index 03ec9e9a698d..105f39e45fc2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C index 81bc081abbb6..562fc138cfd4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C index d54bcdb32119..2fe479934a8b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <cassert> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C index 4103714b0043..99f83cba6cf6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C index 76c6fb9bd34e..3f2d62c94fd8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C index 0634eafb2487..471eaba773fc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <cassert> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C index b682b0d88468..a15749a88be1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <cassert> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C index 13f04d775941..e726e1cc91ef 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C b/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C index 56fbb683868f..50a083287550 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C index 9287ab8e5d7b..238eb819e909 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C index ddf99aa99331..c8590b4074b9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #define assert(E) if (!(E)) __builtin_abort(); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C index b25adcc17c09..f33251987f73 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C index 8a29ca9360c3..4fca936db2b5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C @@ -1,5 +1,5 @@ // Testcase from [expr.prim.id]/5 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct A { static void f(int) requires false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C index e3740d5170e4..fe80460c9c54 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Eq = requires(T t) { t == t; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C index 6aa9d9617791..d5f700c7d39d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Eq = requires(T t) { t == t; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C index 88f9fe825f8d..90ab8f0305d8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C @@ -1,5 +1,5 @@ // C++20 NB comment US115 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept Any = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C index 4e2d13f8eb3a..4ddf516b1a9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C @@ -1,5 +1,5 @@ // PR c++/67240 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-diagnostics-depth=2" } template <class T, class U> concept Same = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C index aa244bc04c12..b858e2770d15 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C index 34eaf22c26c5..7fe930cd8654 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C index c92d6ac774cd..ad29068e49f7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C @@ -1,5 +1,5 @@ // PR c++/91930 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> struct basic_mixin { basic_mixin() requires true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C index ef1968899f6a..61595749f71c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C @@ -1,5 +1,5 @@ // PR c++/82565 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct string { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C index a7419d69a465..44b509dd3808 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept False = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C index 96da7852a70f..291e451ca1a8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template<typename T> concept C1 = __is_same_as(T, int) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C index dfb5f3bcc5e8..daaaf31cf6cf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct a {}; template <bool> using b = a; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C index fe471899c14d..ee9180e2866e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C @@ -1,5 +1,5 @@ // PR c++/92556 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Having this as a hard error is consistent with template argument deduction; // it's an open core issue (jason 2020-02-14). diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C index 6c81c1476ab8..c841daec7f28 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C b/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C index f3a2d064dbd7..cec45b46aa04 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // FIXME: Diagnostics should be better. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C index acfa188af219..8867b7bf3a15 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C index f6ad51963524..77e10c6b5c72 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <cassert> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C index ee28d5b77547..7ddfe62590cf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C index 418040aa56e9..987bf27f7848 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void f1(int); void f2(int) noexcept; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C index 5ba3ab19c23f..fb3272632c70 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept is_int = __is_same_as(T,int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C index f33f74969b7b..8774d4f6fd70 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C @@ -1,5 +1,5 @@ // PR c++/67138 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept Auto = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C index 2bb4bacb2ef3..9e455d5d3a2d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C @@ -1,5 +1,5 @@ // PR c++/67152 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept HasType = requires { typename T::type; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C index cbea81d6b210..887fe4df3a9e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T, class U> concept Same = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C index b04354cf8d08..9e6fd16c3682 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C @@ -1,5 +1,5 @@ // PR c++/94481 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C index 5af2a40e9a3d..7176efbc6080 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Concept = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C index 52f24ec90be2..54405f2ca6ef 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C1 = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C index b99a3433f6c5..1bcc051243fd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using TD = int; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C index b246d254bc31..2868f9cfadcd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Performance test... This should be fast. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C index 53bb9a355f1c..93dc32de9225 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C @@ -1,5 +1,5 @@ // PR c++/65854 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Handle alias templates in type requirements. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C index c32f4d1184b5..afeee5927e59 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C @@ -1,5 +1,5 @@ // PR c++/66844 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept Same = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C index ca57a0915f14..c6dfe5d1c79a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C @@ -1,5 +1,5 @@ // PR c++/66962 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename> struct remove_cv; template <typename> struct is_reference; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C index 88017dc723fd..fbaac1c34a3d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept C1 = diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C index db8c37e2191d..1e83fbae3bf9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C @@ -1,5 +1,5 @@ // PR c++/67147 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class F, class I1, class I2 = I1> concept IndirectCallableRelation = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C index c5939960a141..97f80cfcfa86 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C @@ -1,5 +1,5 @@ // PR c++/67148 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace std diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C index 7154fc2b7fe1..c74f6f00a5c5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C @@ -1,5 +1,5 @@ // PR c++/67178 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept c = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C index 044e677363c8..a31750eb495b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C @@ -1,5 +1,5 @@ // PR c++/67210 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C index 35618aed5d35..b1a7a8c333a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C @@ -1,5 +1,5 @@ // PR c++/67217 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> requires __is_same_as(T, double) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C index 500e6314119d..d59d4f95bfb8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class T, class U> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C index 62181768dcc6..f8d99ffe006e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename Target> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C index d08efb661f0a..937098d394f8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C index 0ef5ed872641..e37ad28c1bc1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class, class> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C index 9a25831f4a28..92f42982a388 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C @@ -1,5 +1,5 @@ // PR c++/67225 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename A, typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C index 6eb1c440ed47..5399780cfbf2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C @@ -1,5 +1,5 @@ // PR c++/67319 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C index fcad30183d6c..fad43be6c5ba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C @@ -1,5 +1,5 @@ // PR c++/67427 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class S, class I> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C index 27ee205a7fc2..5087344d2c90 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C @@ -1,5 +1,5 @@ // PR c++/67427 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <bool... Values> struct and_c_impl { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C index 087f4fc83aea..530cb333f383 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class T> concept bool C1() { return false; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C index 35e92954414b..392492214e2b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C index 139ecd6d7985..c712d727235f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> bool f(T x) { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C index 44c077b16a1f..27083371ae1f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class X> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C index d28b44559bd3..c3c5c235455b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class X> concept bool C() { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C index d363c59f6d57..5ee5c2dac8f3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include <type_traits> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C index fff414b8eb24..64cd9d2d3364 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C index 8bad0319a057..693237fa7835 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include <type_traits> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C index 222e52809131..b42ce8b7c301 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } typedef int size_t; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C index 4f2ab5103893..b809553c07a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class, class> class NumericArray {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C index bf9521038415..bc679a71f9c1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename t> struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C index 91e3c80653d9..2dd46dae6d7d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template <class T> concept bool True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C index d1416ebc99cd..9fc90ff39a6b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename F> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C index 23ecf4de2bc5..1fbda9f9ca0c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class> concept C1 = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C index f11d69f75fd2..0a8715d91cca 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C @@ -1,5 +1,5 @@ // PR c++/68683 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename, typename> struct is_same { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C index 2d809e859145..324b3ad8b37e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace zero diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C index 5e96d0e7b7de..1df563b341c5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C index c67e632d4438..d83440d49c6f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C @@ -1,5 +1,5 @@ // PR c++/71368 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept Same = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C index f31997c920da..aee27bc0c98c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class From, class To> concept convertible_to = requires(From (&f)(), void (&g)(To)) { g(f()); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C index 4619cf993afd..cdad62ca440b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept Destructible = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C index 40eeaa7d57bb..447b149b80ca 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include <type_traits> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C index a99103c97dd5..5fdd64eb26fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename T, T N> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C index 69e2fbec4d8a..1a0008e7a989 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename T, typename T::type> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C index 34b96c59582b..92e89da54519 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename F> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C index f7438552ca9c..81a671c7b1ab 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class I> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C index 6e0f062c14bb..01a42a4e73fb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<class T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C index 83a9083cf176..b604f7e00bf1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template<class, class> constexpr bool is_same_v = false; template<class T> constexpr bool is_same_v<T, T> = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C index e40796f49755..ef1d278e99bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C @@ -1,5 +1,5 @@ // PR c++/84551 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-g -O" } template<typename> concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C index b330e4be051c..8d7cb89f3f59 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class> constexpr bool is_int = false; template<> constexpr bool is_int<int> = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C index bcba830bc0dc..f32ca63d5eea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } namespace X diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C index 4428ee1796c4..6fb430d90a38 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } #include <type_traits> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C index bcd4ba540713..28be9e9e0ea4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename X, typename Y = X> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C index ad24da9cb47e..1c25252d47b6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept Concept2 = requires (T t, U u) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C b/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C index 9bfb896cc78d..6df9b852fb1b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename I> struct iterator_traits diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C index ee83d560cf6c..22696c30d816 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<int N, typename T> concept Foo = requires(T t) { foo<N + 1>(t); }; // { dg-error "template instantiation depth" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C index d76f12eb209c..992fcbbfccb6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Fooable = requires(T t) { foo(t); }; // { dg-error "template instantiation depth" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C index b8ca91647920..679f5cfbf696 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Fooable = requires(T t) { foo(t); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C index 7afd34d11fda..03668d34384d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C index bb0e3b0667f1..0364d2e31383 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C @@ -1,5 +1,5 @@ // PR c++/66988 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<bool B> struct bool_constant { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C index be6409ebad81..816a37c10b7d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C @@ -1,5 +1,5 @@ // PR c++/67018 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> constexpr bool Val = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C index c8e3cfd5c63b..2d8c2911a9c6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class> struct all_same { static constexpr bool value = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C index 8ba386258349..062d22c5aeeb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept C = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C index e2893c061ded..06908a419e0b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept A = sizeof(T) >= 4; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C index 9b82061af11c..27af524f7ba1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct string; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C index b9532a36eb57..cb2ac5d93115 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // A poor mans Integral concept. template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C index 1ec1d59fc847..6b665ac52ea3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Type = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C index c97704565a1b..9d8ec94f696c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept integer = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C index 071a838f754f..b020250da50d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept check_c = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C index 282dba63e293..a9b422b5bac5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test the types of atomic constraints diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C index 089db2ba0135..5f7aec5b2817 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename ...> constexpr bool r () { return true; } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C index 1d21cce7eee9..bc38b893c689 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C @@ -1,5 +1,5 @@ // PR c++/94480 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T, typename U> constexpr bool is_same_v = __is_same (T, U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C index bbcba0d5806f..292ce20ee73c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic expression requirements diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C index 61aa72d0452a..3153afa4c4de 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test associated type requirements diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C index 2f912b13d6ad..976efe67c460 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts -fconcepts-diagnostics-depth=2" } // Test conversion requirements (not in C++20) diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C index d98992503421..a4e4402a6cf6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test deduction requirements. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C index 89057c424412..8101d03100bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C @@ -1,5 +1,5 @@ // PR c++/66758 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept C = requires (T t, U u) { t + u; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C index 0d61a0ab313a..0170042b2adf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept C = requires (T t, U u) { t + u; }; // { dg-message "in requirements" } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C b/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C index 3594176627fe..c9ff9cace6ea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C @@ -1,5 +1,5 @@ // PR c++/66832 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U, unsigned N> requires requires (T& t, U &u) { t.foo(); u.foo(); } diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C index 1d005f059d0d..84c9ae9d6dab 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C @@ -1,5 +1,5 @@ // PR c++/92268 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> concept Two = true; template <class T> concept One = Two<typename T::type>; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C index 4ff401a98e9c..39e0d7d8ac75 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C index 239b485f717e..047c19e95ac0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class> concept Dummy = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C index 7c1d69b38d10..3bb2f576a873 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C index 78b6f1c799bc..46c50a6ef5c4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Int = __is_same_as(T, int); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C index 47c8ef72c907..c7d9964f7388 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename... Ts> struct are_same; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C index adcffed060c4..265d89479570 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C index d578b3540841..00cc21067ce7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C index 2bdd3d370c27..18baac48e4dc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Nothrow_assignable = __has_nothrow_assign(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C index b3acec15986a..1cefe3b243f2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // This tests the terse notation. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C index f731bac8c2a3..d28002c035ad 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests using function concepts. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C index 434a5e2651b0..9d47a7a083d0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests using variable concepts. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C index aa96621d9cf8..23ed929acf4f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } // Basic tests for introduction syntax. diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C index cdc40df4387a..06244882167b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } struct Base { diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C b/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C index bf665aa63089..597ad5e1ae1e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fconcepts-ts" } template<typename T, int N, typename... Xs> concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C b/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C index 733382db0f5b..adfecf85c13b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts-using1.C @@ -1,5 +1,5 @@ // PR c++/79591 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class> concept True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts.C b/gcc/testsuite/g++.dg/cpp2a/concepts.C index 5839207177c5..ebeeebf60bbd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Change in grammar for the expression trailing `requires`. template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts1.C b/gcc/testsuite/g++.dg/cpp2a/concepts1.C index a99343fc04df..87adf8c7a69f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts1.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept Class = __is_class(T); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts2.C b/gcc/testsuite/g++.dg/cpp2a/concepts2.C index d3b45f7ddaa6..04e7ee6f892f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts2.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> concept True = true; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts3.C b/gcc/testsuite/g++.dg/cpp2a/concepts3.C index 34dacade330e..4ccfd0805b7b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts3.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> concept same_as = __is_same_as(T,U); diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts4.C b/gcc/testsuite/g++.dg/cpp2a/concepts4.C index 388fad7514b5..5f08ae383ed8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts4.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> struct A { static const int x = 42; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts5.C b/gcc/testsuite/g++.dg/cpp2a/concepts5.C index 24ac2aa4095a..ed8028f8540b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts5.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T, typename U> diff --git a/gcc/testsuite/g++.dg/cpp2a/concepts6.C b/gcc/testsuite/g++.dg/cpp2a/concepts6.C index d69628b0318e..0524bb90a80c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/concepts6.C +++ b/gcc/testsuite/g++.dg/cpp2a/concepts6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace a { diff --git a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C index 554f8a3328a3..531ec1c4c725 100644 --- a/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C +++ b/gcc/testsuite/g++.dg/cpp2a/cond-triv2.C @@ -1,5 +1,5 @@ // PR c++/67348 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <type_traits> #include <vector> diff --git a/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C b/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C index 783cf4c7ef7f..b572650626aa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C +++ b/gcc/testsuite/g++.dg/cpp2a/consteval-void1.C @@ -1,5 +1,5 @@ // PR c++/93257 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <bool, typename> consteval void test() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C index 397cfb0f1a18..7b3903c24eb0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C index d94618369707..193ae93933de 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C index 68ad69c186d1..ad03987f8902 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C @@ -1,5 +1,5 @@ // PR c++/92414 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual void foo (); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C index e8ba63d9609c..c37753b05c5c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Downcast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C index c226292a07d4..f9f82236d15f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Virtual base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C index 8dfa03a9cd59..9ee93c334e9d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // dynamic_cast in a constructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C index 0ce9beb8d72b..4aedf9893ada 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // dynamic_cast in a destructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C index 203067a2581e..1df0772b499a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Adopted from g++.old-deja/g++.other/dyncast1.C. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C index f739c6df94b8..cc1cadae3bc0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Adopted from g++.old-deja/g++.other/dyncast1.C. // But use reference dynamic_cast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C index fcf507289c4d..aed95c295854 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test HINT = -3 (SRC is a multiple public non-virtual base of DST). struct A { virtual void a() {} }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C index f0394d130a32..1d2b8cbebbf3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Here the hint turns out to be wrong: A is a public base of B2, but the // dynamic_cast operand is not that subobject, but rather a sibling base of // B2. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C index c574e7551039..a26678e6ed76 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // dynamic_cast in a constructor. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C index 346f9f564709..25d98c2b661f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C @@ -1,5 +1,5 @@ // PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Here 'b' doesn't point/refer to a public base of Derived. struct Base { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C index aae03f691ca4..2e5ea0e7eb43 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Downcast, with hint > 0. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C index c3e09808e320..9caeb241df61 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Sidecast. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C index 6f42d20ec414..da647bfca5e3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } // From clang's constant-expression-cxx2a.cpp. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C index 743b3018d2f3..77c7043a6fd1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Multiple levels. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C index 23434734e26b..d67c3072b544 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Private base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C index d71497aae6d2..bc3efd05bccb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Protected base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C index 8056f30bb993..1958cae441db 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Unrelated type. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C index d8cbb2f2f0db..7d42ffa5a78f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Ambiguous base. diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C index ab7b89da9e89..75984a2fdcb7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic use. struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C index 74bf8e6677bd..3834457a2768 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // In c++2a we don't emit a call to _ZN3FooI3ArgEC1Ev. struct Arg; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C index 1c7836a674ae..79ad61895b08 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C index 7d3d3729b318..4eb8753906ab 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int uninit; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C index 3d4460a0eb87..96140e6c212b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C index 6ab6abf15056..1335e51c853b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { constexpr E() = default; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C index f80d3f2c27c4..3cfc23a210e9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct E { constexpr E() = default; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C index 16db2974f2a2..87de38a678d4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C @@ -1,5 +1,5 @@ // PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C index 34d9fe58ecb8..ec362ad91605 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C @@ -1,5 +1,5 @@ // PR c++/93803 - ICE with constexpr init and [[no_unique_address]]. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct empty { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C index 541da1c023fd..d0d0411f99dc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C index dd2735289cb6..1c0c0183cd06 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C index dd614ede2c69..78f3ebd74f68 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // This bullet in [dcl.constexpr] is now gone: // - every non-static data member and base class sub-object shall be initialized diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C index 0d21f26da0ef..a9e717d91f94 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C index a2994f5272ca..a1634aab0312 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } /* We used to get the "constexpr constructor for union S::<unnamed union> must initialize exactly one non-static data member" error, but not anymore diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C index dd2741efa8c4..2e62b5377b14 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int a = 1; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C index 0d5a4a79c904..8bb9a9c8dbcf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { constexpr S(int) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C index b44098cc89b1..1ac14c223194 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C @@ -1,5 +1,5 @@ // PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { constexpr S(int) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C index 5d1b7ef10192..a936c1e1294f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { constexpr S () : s (5) {} constexpr S (int x) : s (x) {} int s; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C index bc5e6e5c78a9..6f6b11c2481c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C index 2bf359a350f5..5adf13e6a045 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C index 04f75975c972..fcf398f000e6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C index 21219039152b..6762c24a3427 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C @@ -1,5 +1,5 @@ // PR c++/93633 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A () : a (0) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C index d3733e831b63..0c513bd9f127 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } template <int N> diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C index 6e7880adcb20..70b841208f84 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } constexpr int * diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C index b9bd5ea19c17..4be1bf041fa4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C index b2b65f2ba826..2bb407a4b517 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C index 5c0c2b6f967f..d51bdbb8269d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C index 5fc130e4432d..bb60a8ee91bf 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C @@ -1,5 +1,5 @@ // P0784R7 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C index f13da1044390..e61323adaed2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C index f99f0808f7c3..db45cdf72dc7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C @@ -1,5 +1,5 @@ // PR c++/91369 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C index a81f649b44b8..32f63a51e420 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test non-polymorphic type. #include <typeinfo> diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C index 51c8fb451b8e..495914f1cca2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test polymorphic type. #include <typeinfo> diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C index 38b9e609a9f7..e58026ac6203 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C @@ -1,5 +1,5 @@ // PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test typeid in a template. #include <typeinfo> diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C index c38167ad798d..ac8aa5f669cb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } union U { diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C index b29d3f6aefb0..db00a3f6f28c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C @@ -1,5 +1,5 @@ // PR c++/92695 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual int get () = 0; diff --git a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C index cb55aa3bb560..88229cfd8483 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C @@ -1,5 +1,5 @@ // PR c++/92695 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { virtual int get() = 0; }; struct B : A { constexpr int get() override { return 10; } }; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit1.C b/gcc/testsuite/g++.dg/cpp2a/constinit1.C index 9d1c0289a627..1dc00eaff6f7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit1.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit1.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test basic usage of 'constinit'. const char *g() { return "dynamic init"; } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit10.C b/gcc/testsuite/g++.dg/cpp2a/constinit10.C index a50f285ecb15..b678788541ec 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit10.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit10.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // From PR83428. struct S1 diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit11.C b/gcc/testsuite/g++.dg/cpp2a/constinit11.C index ab3715b2064d..e8b3bcb570b7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit11.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit11.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } int foo (); constexpr int constfoo () { return 42; } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit12.C b/gcc/testsuite/g++.dg/cpp2a/constinit12.C index b5b736f87c20..cc6569b2277b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit12.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit12.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { S(int) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit14.C b/gcc/testsuite/g++.dg/cpp2a/constinit14.C index 72bfab667b8d..86a058b632cc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit14.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit14.C @@ -1,5 +1,5 @@ // PR c++/92134 - constinit malfunction in static data member. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct Value { Value() : v{new int{42}} {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit15.C b/gcc/testsuite/g++.dg/cpp2a/constinit15.C index 325943343302..29e8b51326d4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit15.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit15.C @@ -1,5 +1,5 @@ // PR c++/92058 - constinit malfunction in static data member. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B { B() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit3.C b/gcc/testsuite/g++.dg/cpp2a/constinit3.C index 1db16feafcb4..a29c594657ac 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit3.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit3.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } constinit constinit int v1; // { dg-error "duplicate .constinit." } constexpr constinit int v2 = 1; // { dg-error "can use at most one of the .constinit. and .constexpr. specifiers" } diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit4.C b/gcc/testsuite/g++.dg/cpp2a/constinit4.C index 748a7ffa3a9c..0630e18ee0c0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit4.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit4.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { }; constinit extern S s; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit5.C b/gcc/testsuite/g++.dg/cpp2a/constinit5.C index 3d21f48dbee9..951c6fe1852f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit5.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit5.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Check that we preserve DECL_DECLARED_CONSTINIT_P in duplicate_decls. int gl = 42; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit8.C b/gcc/testsuite/g++.dg/cpp2a/constinit8.C index c6b2975350c1..50bc13f2ce9f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit8.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit8.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Variable templates. int nonconst; diff --git a/gcc/testsuite/g++.dg/cpp2a/constinit9.C b/gcc/testsuite/g++.dg/cpp2a/constinit9.C index 4c7f89251698..9c5c848f7fcb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/constinit9.C +++ b/gcc/testsuite/g++.dg/cpp2a/constinit9.C @@ -1,5 +1,5 @@ // PR c++/91360 - Implement C++20 P1143R2: constinit -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // A run-time test. constexpr int foo (int x) { return x; } diff --git a/gcc/testsuite/g++.dg/cpp2a/desig13.C b/gcc/testsuite/g++.dg/cpp2a/desig13.C index 442e8b74aa4d..a931e3486047 100644 --- a/gcc/testsuite/g++.dg/cpp2a/desig13.C +++ b/gcc/testsuite/g++.dg/cpp2a/desig13.C @@ -11,6 +11,6 @@ void baz () { foo ({.d = 5, 6, .b = 2, 3}); // { dg-error "designator order for field 'S::b' does not match declaration order in 'S'" } - // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } .-1 } + // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } .-1 } bar ({.b = 1, .a = 2}); // { dg-error "designator order for field 'T::a' does not match declaration order in 'T'" } } diff --git a/gcc/testsuite/g++.dg/cpp2a/desig2.C b/gcc/testsuite/g++.dg/cpp2a/desig2.C index 7a0361820627..c993134fea0d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/desig2.C +++ b/gcc/testsuite/g++.dg/cpp2a/desig2.C @@ -5,8 +5,8 @@ struct S { int a, b, c; }; S a = { 1, 2, 3 }; S b = { .a = 1, .b = 2, .c = 3 }; -S c = { 1, .b = 2, .c = 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } } -S d = { .a = 1, 2, 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++2a } } +S c = { 1, .b = 2, .c = 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } +S d = { .a = 1, 2, 3 }; // { dg-error "either all initializer clauses should be designated or none of them should be" "" { target c++20 } } S e = { .b = 1, .b = 2 }; // { dg-error "designator used multiple times in the same initializer list" } #if __cplusplus > 201103L @@ -14,6 +14,6 @@ template <int... N> void foo () { - S f = { .a = N... }; // { dg-error "'...' not allowed in designated initializer list" "" { target c++2a } } + S f = { .a = N... }; // { dg-error "'...' not allowed in designated initializer list" "" { target c++20 } } } #endif diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C index 329588be7ab5..210a5a54c348 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <new> diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C index 2592c0757a33..10cb80acfd17 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C @@ -1,5 +1,5 @@ // PR c++/88969 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <new> diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C index 112fb0ad67e2..9cc495e6d725 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C @@ -1,5 +1,5 @@ // PR c++/88969 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <new> diff --git a/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C b/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C index c122cee4942a..2bf0c09cefc6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C +++ b/gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C @@ -1,5 +1,5 @@ // PR c++/90171 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <new> diff --git a/gcc/testsuite/g++.dg/cpp2a/explicit14.C b/gcc/testsuite/g++.dg/cpp2a/explicit14.C index 9c3acc32ac45..3e510feee23e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/explicit14.C +++ b/gcc/testsuite/g++.dg/cpp2a/explicit14.C @@ -1,5 +1,5 @@ // PR c++/89420 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename> struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/explicit15.C b/gcc/testsuite/g++.dg/cpp2a/explicit15.C index e0058f6dc872..939456c93f04 100644 --- a/gcc/testsuite/g++.dg/cpp2a/explicit15.C +++ b/gcc/testsuite/g++.dg/cpp2a/explicit15.C @@ -1,5 +1,5 @@ // PR c++/89836 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct W { constexpr explicit operator bool() { return true; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C b/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C index 6038c111eb07..874e4cd3e299 100644 --- a/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C +++ b/gcc/testsuite/g++.dg/cpp2a/inline-asm2.C @@ -1,6 +1,6 @@ // P1668R1: Permit unevaluated inline asm in constexpr functions // PR c++/91346 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } constexpr int foo (bool b) diff --git a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C index b636e3b2d875..a7476b1d9d1a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C +++ b/gcc/testsuite/g++.dg/cpp2a/inline-asm3.C @@ -1,5 +1,5 @@ // P1668R1: Permit unevaluated inline asm in constexpr functions -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-Wno-pedantic" } constexpr int diff --git a/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C b/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C index 378336989922..0e96a1a37291 100644 --- a/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C +++ b/gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C @@ -1,5 +1,5 @@ // PR c++/91428 - warn about std::is_constant_evaluated in if constexpr. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wtautological-compare" } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C index 3d69dbb8e989..ab1a4e42bd98 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C @@ -1,5 +1,5 @@ // PR c++/94546 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> T&& forward(T&& t) { return static_cast<T&&>(t); } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C index e608e9520bf9..443061137608 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C @@ -3,4 +3,4 @@ // { dg-options "-std=c++2a" } int j = []<class T>(T t, int i) { return i; }(3, 4); -// { dg-bogus "lambda templates are only available with" "" { target c++2a } .-1 } +// { dg-bogus "lambda templates are only available with" "" { target c++20 } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C b/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C index bedba683671d..de4574205301 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C @@ -1,5 +1,5 @@ // PR c++/94507 - ICE-on-invalid with lambda template. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C b/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C index 8ee9b0327a5a..35abc9179e70 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C @@ -1,5 +1,5 @@ // Test lambda mangling -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-require-weak "" } // { dg-options "-fno-inline" } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C index 89c635328314..e5942ac0550a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } void bar(); void bar(int); diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C index 55d689dbc679..e950d6575740 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C @@ -1,5 +1,5 @@ // PR c++/89686 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename... Ts> void foo(Ts... xs) diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C index e7c815b92d45..b49e26dc7a38 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C @@ -1,5 +1,5 @@ // P2095R0 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "" } template <class... T> diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C index 492fc479e942..5fcf41b1a1f7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C @@ -1,5 +1,5 @@ // PR c++/94483 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<int... a> constexpr auto x1 = [...z = -a] (auto F) { return F(z...); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C index b2d30d64e5a6..3e00e68e9060 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-this3.C @@ -6,8 +6,8 @@ struct X { int x; void foo (int n) { auto a1 = [=] { x = n; }; // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a2 = [=, this] { x = n; }; // { dg-warning "explicit by-copy capture" "" { target c++17_down } .-1 } auto a3 = [=, *this]() mutable { x = n; }; @@ -16,14 +16,14 @@ struct X { auto a6 = [&, *this]() mutable { x = n; }; auto a7 = [=] { // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a = [=] { // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } auto a2 = [=] { x = n; }; // { dg-bogus "implicit capture" "" { target c++17_down } } - // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++2a } .-1 } - // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++2a } .-2 } + // { dg-warning "implicit capture of 'this' via '\\\[=\\\]' is deprecated" "" { target c++20 } .-1 } + // { dg-message "add explicit 'this' or '\\\*this' capture" "" { target c++20 } .-2 } }; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C index 8a1703304ab8..816b6e994def 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } typedef decltype([]{}) C; // the closure type has no name for linkage purposes diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C index a04262494c73..01ad27f11515 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C @@ -1,5 +1,5 @@ // PR c++/92010 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> void spam(decltype([]{}) (*s)[sizeof(T)] = nullptr) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C index 24d2e701e447..c66c6f8353f9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C @@ -1,5 +1,5 @@ // PR c++/94521 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> void spam(decltype([]{}) *s) diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C index f29a59e26fdb..d8b20bdc2a42 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // ill-formed, no diagnostic required: the two expressions are // functionally equivalent but not equivalent diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C index 3c9b1e1cd452..994d184b643f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <int N> void foo(const char (*s)[([]{}, N)]) {} template <class T> void spam(decltype([]{}) (*s)[sizeof(T)]) {} diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C index e75a1270c72a..f12273910d31 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C @@ -1,4 +1,4 @@ -// { dg-do link { target c++2a } } +// { dg-do link { target c++20 } } template <class T> T f(T t) { return t; } using L = decltype([]{ return f(42); }); diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C index 7fb05c3ce9c7..dc19004d3a1d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } using L = decltype([]{ }); void f(L) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C index 0396f9ff10d4..7d5aa316e930 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } static decltype([] { }) f(); static decltype([] { }) f(); // { dg-error "ambiguating" } diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C index 41028824ce88..efe3691d8c9e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <int N> struct A { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C index 3692154f9bec..966da0cc3fa1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <auto N> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C index e32d447819ed..f512ae7a0f7a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C +++ b/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // { dg-additional-sources "lambda-uneval9.cc" } #include "lambda-uneval9.h" diff --git a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C index 01e41424bc7a..e7024babe541 100644 --- a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C +++ b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <new> @@ -8,5 +8,5 @@ namespace delete_selection_d { void operator delete(B *, std::destroying_delete_t) = delete; }; void delete_B(B *b) { delete b; } // { dg-bogus "deleted .* deleted" } - // { dg-error "deleted" "" { target c++2a } .-1 } + // { dg-error "deleted" "" { target c++20 } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C index 314e2e9b697c..5db55c419876 100644 --- a/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C +++ b/gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <new> @@ -8,5 +8,5 @@ namespace delete_selection_r { void operator delete(void*) = delete; }; void delete_B(B *b) { delete b; } // { dg-bogus "deleted .* deleted" } - // { dg-error "deleted" "" { target c++2a } .-1 } + // { dg-error "deleted" "" { target c++20 } .-1 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C b/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C index 9b5f2cab47b0..a1cbe52124b5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C +++ b/gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C @@ -1,5 +1,5 @@ // P1094R2 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } inline namespace A::B { // { dg-error "a nested namespace definition cannot be inline" } int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C b/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C index dd019393f283..9cc8b94abb40 100644 --- a/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C +++ b/gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } [[no_unique_address]] struct B { }; // { dg-warning "attribute" } [[no_unique_address]] int i; // { dg-warning "attribute" } diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c b/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c index a5c2c6514cf3..9af4e59c3dca 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ struct A { [[nodiscard("bad constructor")]] A() {} }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C index 78349715aaea..c810fd0daad2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard, nodiscard]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*can appear at most once" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C index 76692e732c4f..d81baf0ebcdb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard(123)]] int check1 (void); /* { dg-error "nodiscard\[^\n\r]*must be a string constant" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C index d42f4dc7bbe9..6104a5ffa085 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ [[nodiscard("not", "allowed")]] int check1 (void); /* { dg-error "wrong number of arguments.\[^\n\r]*nodiscard" } */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C index 5fda058c9eec..2db2303c72d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C +++ b/gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C @@ -1,5 +1,5 @@ /* nodiscard attribute tests, adapted from gcc.dg/attr-warn-unused-result.c. */ -/* { dg-do compile { target c++2a } } */ +/* { dg-do compile { target c++20 } } */ /* { dg-options "-O -ftrack-macro-expansion=0" } */ #define NODIS [[nodiscard("exact_message")]] diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C index a3334fc7d480..8f3b32948d08 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-additional-options "-fdelete-null-pointer-checks" } struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C index 5cc179300ca5..31520c8de1ba 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class10.C @@ -1,5 +1,5 @@ // PR c++/88196 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct C { C *c; }; template <C> struct D; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C index 8a06d23904b9..502a835bc966 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class11.C @@ -1,5 +1,5 @@ // PR c++/88538 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { unsigned a; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C index 11f8c12f3ffa..824f0b40141f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class12.C @@ -1,5 +1,5 @@ // PR c++/88744 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #define SA(X) static_assert((X),#X) diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C index 14c601ba0401..035dbb161e94 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class13.C @@ -1,5 +1,5 @@ // PR c++/77304 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C index 9cc14460734d..3d451a90b111 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class14.C @@ -1,5 +1,5 @@ // PR c++/89532 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct tuple; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C index d684785a77f6..1142974495dc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class15.C @@ -1,7 +1,7 @@ // PR c++/89833 // Test to verify that the same specializations on non-type template // parameters of class types are in fact treated as the same. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A1 { char c[5]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C index 3afb5d24261b..8ed742ff625e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class16.C @@ -2,7 +2,7 @@ // Test to verify that arrays of null pointer to members used as // non-type template arguments are interprested as null regardless // of the form of their initialization. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-O2 -Wall -fdump-tree-optimized" } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C index ca5f68e16114..2e1433939dc8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class17.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<auto> struct S { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C index 22f47884d08e..5319ca1e583c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class18.C @@ -1,5 +1,5 @@ // PR c++/90101 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename List> struct A; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C index 91267aca3839..fe87ffc5404e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class19.C @@ -1,5 +1,5 @@ // PR c++/90099 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct Unit { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C index 2785f9475448..6811c2741bbb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C index 5d3479c345e9..4b4d32989ca6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class20.C @@ -1,5 +1,5 @@ // PR c++/90098 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C index c58fe05b9dd9..7f3d3620fef4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class21.C @@ -1,5 +1,5 @@ // PR c++/90101 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<int N> struct A{}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C index 026855f0bc65..193095b237d5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class22.C @@ -1,5 +1,5 @@ // PR c++/90100 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> inline constexpr bool is_nontype_list = false; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C index ab9e80fd335d..134d1bf4d984 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class23.C @@ -3,7 +3,7 @@ // parameters of class types are in fact treated as the same. Unlike // nontype-class15.C which involves only one-dimensional arrays this // test involves arrays of arrays and arrays of structs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct AA3 { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C index aa96de36a80f..6c703b7f8ed1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class24.C @@ -1,5 +1,5 @@ // PR c++/92150 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { int value; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C index 67d6f0949684..279d4d00e36c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class25.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct base { int i{}; }; struct derived : private base {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C index 315e0ac23098..7707f439aadc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class26.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct p { unsigned p_ {}; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C index 23eae64c64b6..ae64fac81c23 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class27.C @@ -1,5 +1,5 @@ // PR c++/92965 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<int> class TS { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C index 80b9b4993555..a8b05fe83802 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class28.C @@ -1,5 +1,5 @@ // PR c++/92948 - Fix class NTTP with template arguments. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A(int) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C index 2d2e9690a06e..a3c1446af5d9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class29.C @@ -1,5 +1,5 @@ // PR c++/92948 - Fix class NTTP with template arguments. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C index 0c0fcf6be337..750accdd5256 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C index b2e174c7fd35..44b8338b0ae3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class30.C @@ -1,5 +1,5 @@ // PR c++/91754 - Fix template arguments comparison with class NTTP. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C index 329b3129e1b1..dbecf91c46d3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class31.C @@ -1,5 +1,5 @@ // PR c++/88092 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C index 6a4dac5c90e8..9c6d6f93bda9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class32.C @@ -1,5 +1,5 @@ // PR c++/88819 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T, template<T> class TT, class R = TT <0>> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C index 1b9dfb88918b..7a1b9e66f0c6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class33.C @@ -1,5 +1,5 @@ // PR c++/90938 - Initializing array with {1} works, but not {0} -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wall" } struct A { int i; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C index 2d3ba018618d..acbc62151f80 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class34.C @@ -1,5 +1,5 @@ // PR c++/94592 - ICE with { } as template argument. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { constexpr A() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C index 78cf0a39c816..7d0126c64fbc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class35.C @@ -1,5 +1,5 @@ // PR c++/94592 - ICE with { } as template argument. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C index 1c1e23c10a87..8371eb96621f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class36.C @@ -1,5 +1,5 @@ /* PR c++/94510 - nullptr_t implicitly cast to zero twice in std::array - { dg-do compile { target c++2a } } + { dg-do compile { target c++20 } } { dg-options "-Wall" } */ struct A { int i; int f (); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C index 5649fa2e6dc1..f5e9826d2431 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class37.C @@ -1,5 +1,5 @@ /* PR c++/94510 - nullptr_t implicitly cast to zero twice in std::array - { dg-do compile { target c++2a } } + { dg-do compile { target c++20 } } { dg-options "-Wall" } */ struct A { char a[4]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C index fc0e7c9655de..6235fc8f3f52 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C index 8c39cd727151..67c57099f741 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class5.C @@ -1,5 +1,5 @@ // Example from P0732 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T, T p> class X { /* ... */ diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C index 246fab6c1786..377a151d343e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { char ar[10]; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C index 15389e185370..436f4fdfe112 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class7.C @@ -1,5 +1,5 @@ // Example from P0732. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(1)); diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C index 47fc9c7f5c0c..af22a9389be0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class8.C @@ -1,7 +1,7 @@ // If the entity is a template parameter object for a template parameter of // type T, the type of the expression is const T. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> struct same; template <class T> struct same<T,T> {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C index 737f712be470..d62be58d57d2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class9.C @@ -1,5 +1,5 @@ // PR c++/88216 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <class T, class U> struct same; template <class T> struct same<T,T> {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init1.C b/gcc/testsuite/g++.dg/cpp2a/paren-init1.C index a54b2ccaf6dc..316c162dd525 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init1.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init1.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init10.C b/gcc/testsuite/g++.dg/cpp2a/paren-init10.C index 5c70d9d59eee..8e635de4514b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init10.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init10.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test from [dcl.init]. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init11.C b/gcc/testsuite/g++.dg/cpp2a/paren-init11.C index 82ca26695451..638e9c2ecca9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init11.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init11.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test ill-formed code. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init12.C b/gcc/testsuite/g++.dg/cpp2a/paren-init12.C index d7be6f2b55da..c53b4b535428 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init12.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init12.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init13.C b/gcc/testsuite/g++.dg/cpp2a/paren-init13.C index 4b9107c70ff4..31c7d4e1669c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init13.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init13.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { int a, b; }; struct Y { X x; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init15.C b/gcc/testsuite/g++.dg/cpp2a/paren-init15.C index 4311dd4df595..ddaea8fd90d9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init15.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init15.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init16.C b/gcc/testsuite/g++.dg/cpp2a/paren-init16.C index c8ed924877e8..dd991aec8c87 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init16.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init16.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int a[2]; }; struct A { S s[1]; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init18.C b/gcc/testsuite/g++.dg/cpp2a/paren-init18.C index 0aea493f2145..40a65a573cfa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init18.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init18.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int a, b, c; }; struct S { A a; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init19.C b/gcc/testsuite/g++.dg/cpp2a/paren-init19.C index 73643fa3aa2f..065e16a21bef 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init19.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init19.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int i[2]; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init2.C b/gcc/testsuite/g++.dg/cpp2a/paren-init2.C index e9e90d7acb6a..f1221b286e87 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init2.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init2.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct A { int i = 0; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init20.C b/gcc/testsuite/g++.dg/cpp2a/paren-init20.C index 05da7604686a..4dcc94d5630f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init20.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init20.C @@ -1,5 +1,5 @@ // PR c++/92878 - Parenthesized init of aggregates in new-expression. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test new TYPE(...). int f (); diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init21.C b/gcc/testsuite/g++.dg/cpp2a/paren-init21.C index cfd37193f668..f8e6c4bee1c8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init21.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init21.C @@ -1,5 +1,5 @@ // PR c++/92947 - Paren init of aggregates in unevaluated context. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int a; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init22.C b/gcc/testsuite/g++.dg/cpp2a/paren-init22.C index 1b2959e7731c..ac7ab9c58084 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init22.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init22.C @@ -1,5 +1,5 @@ // PR c++/94155 - crash in gimplifier with paren init of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i, j; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init23.C b/gcc/testsuite/g++.dg/cpp2a/paren-init23.C index 6038f63be5ad..b6761ddb85d7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init23.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init23.C @@ -1,5 +1,5 @@ // PR c++/93790 - wrong paren-init of aggregates interference. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int i; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init24.C b/gcc/testsuite/g++.dg/cpp2a/paren-init24.C index 4e97bbc5b561..261bcbffb456 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init24.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init24.C @@ -1,5 +1,5 @@ // PR c++/94149 - make __is_constructible work with paren-init of aggrs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <type_traits> diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init25.C b/gcc/testsuite/g++.dg/cpp2a/paren-init25.C index 53855a9ef9ea..011ff318536d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init25.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init25.C @@ -1,5 +1,5 @@ // PR c++/94149 - make __is_constructible work with paren-init of aggrs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct nonaggr { nonaggr() {} diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init26.C b/gcc/testsuite/g++.dg/cpp2a/paren-init26.C index 0b98ebf43bb6..cf1edb6bdf96 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init26.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init26.C @@ -1,5 +1,5 @@ // PR c++/94885 - paren-init of aggregates accepts invalid code. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T, typename = decltype(T(0))> // { dg-error "could not convert" } void foo(); diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init3.C b/gcc/testsuite/g++.dg/cpp2a/paren-init3.C index f444005a09fe..ebfa8db033a9 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init3.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init3.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } class a { int b{}; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init4.C b/gcc/testsuite/g++.dg/cpp2a/paren-init4.C index f8c7bd10b63c..0bfddf0bbb83 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init4.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init4.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } // Test T[](). diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init5.C b/gcc/testsuite/g++.dg/cpp2a/paren-init5.C index a64cb00ebbc3..6d2efd70731f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init5.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init5.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } union U { int a; diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init6.C b/gcc/testsuite/g++.dg/cpp2a/paren-init6.C index b5d97dcb3d8e..96a328445285 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init6.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init6.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test that we don't perform lifetime extension for () init. diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init7.C b/gcc/testsuite/g++.dg/cpp2a/paren-init7.C index 32af1a7265ce..81f909e943b3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init7.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init7.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } int h; struct i { diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init8.C b/gcc/testsuite/g++.dg/cpp2a/paren-init8.C index 30e71650bc92..6433c17f55d6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init8.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init8.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Test that we don't accept designated inits in ( ). diff --git a/gcc/testsuite/g++.dg/cpp2a/paren-init9.C b/gcc/testsuite/g++.dg/cpp2a/paren-init9.C index c44b206feb84..7058d274c1d3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/paren-init9.C +++ b/gcc/testsuite/g++.dg/cpp2a/paren-init9.C @@ -1,5 +1,5 @@ // PR c++/91363 - P0960R3: Parenthesized initialization of aggregates. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B { }; struct A : B { diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88534.C b/gcc/testsuite/g++.dg/cpp2a/pr88534.C index 54faf385f11a..2da38142bf07 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr88534.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr88534.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-g" } typedef __SIZE_TYPE__ size_t; diff --git a/gcc/testsuite/g++.dg/cpp2a/pr88537.C b/gcc/testsuite/g++.dg/cpp2a/pr88537.C index d558d45f5783..8d59643037b4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr88537.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr88537.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-g" } struct pair { diff --git a/gcc/testsuite/g++.dg/cpp2a/pr89913.C b/gcc/testsuite/g++.dg/cpp2a/pr89913.C index c06847e67c35..8ef9b1e28302 100644 --- a/gcc/testsuite/g++.dg/cpp2a/pr89913.C +++ b/gcc/testsuite/g++.dg/cpp2a/pr89913.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename...> using A = auto; // { dg-error "not allowed" } // In pre-20, the error is "invalid use of auto" diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C index 9d008f19feac..6ccc7e8507bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C index 02f92b10aef0..2610864f29cb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C @@ -1,5 +1,5 @@ // PR c++/93650 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using type = enum _Ord { less }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C index bc673b2e0204..217e34fe79fc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C @@ -1,5 +1,5 @@ // PR c++/92560 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C index 19a03fb04dfc..88e2d36988e8 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } struct D { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C index 7e98c472cd1b..1e26e57f0653 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } template <class T> struct D diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C index 06b988f6e57e..8de75bd2f3b4 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct D { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C index 490726de56f1..d31faef095d0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { bool operator==(const A&) const; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C index d89fc885e501..66b228d07afd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int operator==(const A&) const = default; // { dg-error "return .bool" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C index ac24f366c94d..429d31a22124 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { int &r; // { dg-message "reference" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C index f804e1337141..265d075ab18d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C index 8112eaa4f80a..b1351886176b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } union A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C index aabbd324d862..61bcde55d1c1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C @@ -1,5 +1,5 @@ // PR c++/92966 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct S { int operator==(const S&) const = default; // { dg-error "must return 'bool'" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C index 4f5df2264104..5533481a61b1 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C @@ -1,5 +1,5 @@ // PR c++/94462 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C index ce7b56ce5741..905b60086d95 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C @@ -1,5 +1,5 @@ // Test that we suggest adding #include <compare>. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } auto x = 1<=>2; // { dg-error "" } // { dg-message "<compare>" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C index 6461c6ab60a7..56ab343c9a7a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> template <class T, T x = (T() <=> T())> // { dg-error "31:0 <=> 0" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C index e756ebca9458..825bd7032a79 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C index 00f90ced2555..b044914bbfcc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C @@ -1,5 +1,5 @@ // PR c++/94478 - ICE with defaulted comparison operator. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct B {}; bool operator!=(const B&, const B&) = default; // { dg-error "equality comparison operator can only be defaulted in a class definition" } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C index bb60302622f7..c4030cd2f4d6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C @@ -1,5 +1,5 @@ // This should continue to work. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C index ef29cffbd0b9..d0e4a8922258 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C @@ -1,10 +1,10 @@ // Test that very different operators still cause ambiguity with reversed. struct X { operator int(); }; -bool operator==(X, int); // #1 { dg-message "reversed" "" { target c++2a } } +bool operator==(X, int); // #1 { dg-message "reversed" "" { target c++20 } } struct Y { operator int(); }; -bool operator==(Y, int); // #2 { dg-message "reversed" "" { target c++2a } } +bool operator==(Y, int); // #2 { dg-message "reversed" "" { target c++20 } } X x; Y y; -bool b1 = x == y; // { dg-error "ambiguous" "" { target c++2a } } -bool b2 = y == x; // { dg-error "ambiguous" "" { target c++2a } } +bool b1 = x == y; // { dg-error "ambiguous" "" { target c++20 } } +bool b2 = y == x; // { dg-error "ambiguous" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C index c068b5ab2949..f3488ea07541 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C @@ -8,5 +8,5 @@ struct const_iterator { struct iterator { bool operator==(const const_iterator &ci) const { return ci == *this; // { dg-error "deleted" "" { target c++17_down } } - } // { dg-warning "reversed" "" { target c++2a } .-1 } + } // { dg-warning "reversed" "" { target c++20 } .-1 } }; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C index 182bf2b90926..6e08acf2b208 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C index 0d1dd63d3683..c4971aafc03f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C index 552c92aa5bd3..3607c8166641 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C index d3cb0a6b0f0a..9d96944399ab 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C index 7dacaf4b81d0..e6baaa262c74 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-fext-numeric-literals" } int main() diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C index 6a03f54b91ae..eb199186153a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // missing #include <compare> template <class T, T x = (T() <=> T()) == 0> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C index f9b2dc449e2c..6c35f70ea6ce 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C index ecc249a67b7a..486db6cbbf9c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C @@ -1,5 +1,5 @@ // PR c++/92774 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C index 45ce4ee047a4..a4d8b32922fb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C @@ -1,5 +1,5 @@ // PR c++/92496 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<auto V> struct A {}; diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C index 2a35de99e09d..1872fb5382ca 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C index 32314579dcbc..899a83c80b31 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C index cf23c9771e01..e6401d29ef0d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C index 11fe32f86dce..959e376b4467 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C index 2632f525aadc..65915ce6c0af 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C @@ -1,5 +1,5 @@ // Test with only spaceship defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C index 0fc5aa2c9b84..aac0013725d0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C @@ -1,5 +1,5 @@ // Test for reversed candidates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C index 89f84899fcce..20da546d82a6 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C @@ -1,5 +1,5 @@ // Test for reversed candidates. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C index 033578122ae0..291f6e839cfa 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C index 8e4aa864b27d..49f88f6f6945 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C @@ -1,5 +1,5 @@ // Test with all operators explicitly defaulted. -// { dg-do run { target c++2a } } +// { dg-do run { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C index e8296bbb60a8..4765601f2390 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C @@ -1,5 +1,5 @@ // PR c++/94583 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C index 86b661ca6e00..7cb201416f92 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C @@ -1,5 +1,5 @@ // PR c++/94583 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C index d0d68c7fa6fe..bd1c4d2af2f0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C @@ -1,5 +1,5 @@ // PR c++/94907 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct strong_ordering { }; } diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C index 83547691118d..bc1ec63113a5 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> diff --git a/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C b/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C index 1ff39549973c..400d9931b668 100644 --- a/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C +++ b/gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C @@ -1,5 +1,5 @@ // Test explicit weak_ordering. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } #include <compare> struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc1.C b/gcc/testsuite/g++.dg/cpp2a/srcloc1.C index c88bc146a5db..6e19ff77756b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc1.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc1.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc10.C b/gcc/testsuite/g++.dg/cpp2a/srcloc10.C index a27016d1e364..1be78d9f7bd0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc10.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc10.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc11.C b/gcc/testsuite/g++.dg/cpp2a/srcloc11.C index 742a8925e549..abc850fcd43d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc11.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc11.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc12.C b/gcc/testsuite/g++.dg/cpp2a/srcloc12.C index 900e5a8cab88..49a7e569b7fc 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc12.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc12.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc13.C b/gcc/testsuite/g++.dg/cpp2a/srcloc13.C index 890931236b8d..ee7b1248354a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc13.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc13.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc14.C b/gcc/testsuite/g++.dg/cpp2a/srcloc14.C index 21ab8311d36b..2730143c6ee2 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc14.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc14.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc2.C b/gcc/testsuite/g++.dg/cpp2a/srcloc2.C index 380d83428cfd..5ef09bbb1b1b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc2.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc2.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { inline namespace _8 { } diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C index b841ff6ceaa1..29587e4ebb5b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc3.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc3.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } auto x = __builtin_source_location (); // { dg-error "'source_location' is not a member of 'std'" } // { dg-message "std::source_location' is defined in header '<source_location>'; did you forget to '#include <source_location>'" "" { target *-*-* } .-1 } diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc4.C b/gcc/testsuite/g++.dg/cpp2a/srcloc4.C index c8c5f5139313..c10f64b95d26 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc4.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc4.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { void source_location (); diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc5.C b/gcc/testsuite/g++.dg/cpp2a/srcloc5.C index 0e89a00a13cf..ce7170b6dcea 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc5.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc5.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { typedef int source_location; diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc6.C b/gcc/testsuite/g++.dg/cpp2a/srcloc6.C index a389add2e7c9..89c6887cb464 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc6.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc6.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc7.C b/gcc/testsuite/g++.dg/cpp2a/srcloc7.C index 2a8b569a1af4..ef56edf9426a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc7.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc7.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc8.C b/gcc/testsuite/g++.dg/cpp2a/srcloc8.C index db56bb5ff901..caef812b464b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc8.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc8.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/srcloc9.C b/gcc/testsuite/g++.dg/cpp2a/srcloc9.C index 01ba00aaf414..47fce003913c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/srcloc9.C +++ b/gcc/testsuite/g++.dg/cpp2a/srcloc9.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { struct source_location { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename1.C b/gcc/testsuite/g++.dg/cpp2a/typename1.C index 0c1f6309c5bd..726c9df5c88e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename1.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename1.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // OK, return type of a function declaration at global scope. template<class T> T::R f(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename10.C b/gcc/testsuite/g++.dg/cpp2a/typename10.C index 1413268ba16f..cdd1465d010e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename10.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename10.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace N { // template<typename T> extern T::type v; // #1a diff --git a/gcc/testsuite/g++.dg/cpp2a/typename11.C b/gcc/testsuite/g++.dg/cpp2a/typename11.C index ed7ad958f62c..5dd81f105ca7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename11.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename11.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct A diff --git a/gcc/testsuite/g++.dg/cpp2a/typename12.C b/gcc/testsuite/g++.dg/cpp2a/typename12.C index 97962e53d65e..99a235961a32 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename12.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename12.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct W { template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/typename13.C b/gcc/testsuite/g++.dg/cpp2a/typename13.C index c439f726c5d8..5aa5a516cd4e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename13.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename13.C @@ -1,5 +1,5 @@ // P0634R3, PR c++/88358 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template <typename T> int pi(T::your_pi); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename14.C b/gcc/testsuite/g++.dg/cpp2a/typename14.C index 4750db35cd84..8d82b6b8d34f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename14.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename14.C @@ -1,5 +1,5 @@ // PR c++/88325 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename15.C b/gcc/testsuite/g++.dg/cpp2a/typename15.C index 9094190cec97..72476712562d 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename15.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename15.C @@ -1,5 +1,5 @@ // PR c++/88979 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct B { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename16.C b/gcc/testsuite/g++.dg/cpp2a/typename16.C index 7f4242a1dbae..bb6d528201fe 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename16.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename16.C @@ -1,5 +1,5 @@ // PR c++/90572 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { X(int); }; diff --git a/gcc/testsuite/g++.dg/cpp2a/typename17.C b/gcc/testsuite/g++.dg/cpp2a/typename17.C index bf534f1717f5..5f8be8f9e010 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename17.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename17.C @@ -1,5 +1,5 @@ // DR 2413 - typename in conversion-function-ids. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> struct S { operator T::X(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename2.C b/gcc/testsuite/g++.dg/cpp2a/typename2.C index 7c9261770043..4a2a1cde53e0 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename2.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename2.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> typename T::R f(); diff --git a/gcc/testsuite/g++.dg/cpp2a/typename3.C b/gcc/testsuite/g++.dg/cpp2a/typename3.C index e64aa0316efb..55ad378c1b16 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename3.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename3.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> void f(int i) diff --git a/gcc/testsuite/g++.dg/cpp2a/typename4.C b/gcc/testsuite/g++.dg/cpp2a/typename4.C index 69154e7daaf6..fc65eee85cf3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename4.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename4.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<class T> struct A { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename5.C b/gcc/testsuite/g++.dg/cpp2a/typename5.C index 97c27adafcc1..6913d088dcec 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename5.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename5.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct X { template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/typename6.C b/gcc/testsuite/g++.dg/cpp2a/typename6.C index e96e2ab802c8..8b5a4533f8b3 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename6.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename6.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // (5.2.1) simple-declaration or a function-definition in namespace scope diff --git a/gcc/testsuite/g++.dg/cpp2a/typename7.C b/gcc/testsuite/g++.dg/cpp2a/typename7.C index 713db51d9724..2354fafcfa0e 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename7.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename7.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // Not in namespace scope. template<typename T> diff --git a/gcc/testsuite/g++.dg/cpp2a/typename8.C b/gcc/testsuite/g++.dg/cpp2a/typename8.C index 3ebfde45ec54..afba0f83b31a 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename8.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename8.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } template<typename T> struct S { diff --git a/gcc/testsuite/g++.dg/cpp2a/typename9.C b/gcc/testsuite/g++.dg/cpp2a/typename9.C index 7b1865222b31..70f9e3996f8f 100644 --- a/gcc/testsuite/g++.dg/cpp2a/typename9.C +++ b/gcc/testsuite/g++.dg/cpp2a/typename9.C @@ -1,5 +1,5 @@ // P0634R3 -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-fconcepts" } template <typename, typename> class A { class B; }; diff --git a/gcc/testsuite/g++.dg/cpp2a/ucn2.C b/gcc/testsuite/g++.dg/cpp2a/ucn2.C index 2e6ce11d2e77..ee7011b4a3b7 100644 --- a/gcc/testsuite/g++.dg/cpp2a/ucn2.C +++ b/gcc/testsuite/g++.dg/cpp2a/ucn2.C @@ -6,11 +6,11 @@ const char16_t *a = u"\U0001F914\u2753"; const char32_t *b = U"\U0001F914\u2753"; const char16_t *c = u"\uD802"; // { dg-error "is not a valid universal character" } const char16_t *d = u"\U0000DFF0"; // { dg-error "is not a valid universal character" } -const char16_t *e = u"\U00110000"; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char16_t *e = u"\U00110000"; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "converting UCN to execution character set" "" { target *-*-* } .-1 } const char32_t *f = U"\uD802"; // { dg-error "is not a valid universal character" } const char32_t *g = U"\U0000DFF0"; // { dg-error "is not a valid universal character" } -const char32_t *h = U"\U00110001"; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char32_t *h = U"\U00110001"; // { dg-error "is outside the UCS codespace" "" { target c++20 } } #if __cpp_unicode_characters >= 201411 const char8_t i = u8'\u00C0'; // { dg-error "character constant too long for its type" "" { target c++17 } } #endif @@ -22,9 +22,9 @@ const char8_t l = u8'ab'; // { dg-error "character constant too long for its ty const char16_t m = u'ab'; // { dg-error "character constant too long for its type" } const char32_t n = U'ab'; // { dg-error "character constant too long for its type" } #if __cpp_unicode_characters >= 201411 -const char8_t o = u8'\U00110002'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char8_t o = u8'\U00110002'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "character constant too long for its type" "" { target c++17 } .-1 } #endif -const char16_t p = u'\U00110003'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char16_t p = u'\U00110003'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } // { dg-error "converting UCN to execution character set" "" { target *-*-* } .-1 } -const char32_t q = U'\U00110004'; // { dg-error "is outside the UCS codespace" "" { target c++2a } } +const char32_t q = U'\U00110004'; // { dg-error "is outside the UCS codespace" "" { target c++20 } } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C index 437fa9b5ab89..b91e01ce0b37 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate handling of failed class template argument deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C index 89bb5d39d7db..067fdbac81eb 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate rejection of class template parameter packs. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C index f6877a960c95..e9421bc40729 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate support for class template argument deduction. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } namespace std { using size_t = decltype(sizeof(int)); diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C index 8f7e3f295117..85b3fe7fc61b 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate that parameter packs are rejected. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct literal_class { constexpr literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C index 71ba8f981a0d..62cb86ae6954 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate that non-literal class types are rejected. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct non_literal_class { constexpr non_literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C index dcaca3e40701..b7ef79d68a0c 100644 --- a/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C +++ b/gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C @@ -1,7 +1,7 @@ // PR c++/88095 // Test class non-type template parameters for literal operator templates. // Validate basic support. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } struct literal_class { constexpr literal_class(...) { } diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile1.C b/gcc/testsuite/g++.dg/cpp2a/volatile1.C index e47591b13bce..7ea6b477ca27 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile1.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile1.C @@ -24,21 +24,21 @@ struct W { W& operator=(volatile W&) volatile; }; -volatile int // { dg-warning ".volatile.-qualified return type is deprecated" "" { target c++2a } } -fn (volatile int i) // { dg-warning ".volatile.-qualified parameter is deprecated" "" { target c++2a } } +volatile int // { dg-warning ".volatile.-qualified return type is deprecated" "" { target c++20 } } +fn (volatile int i) // { dg-warning ".volatile.-qualified parameter is deprecated" "" { target c++20 } } { volatile int v = 10; int *volatile p = nullptr; // Pre/post ++/--. - v++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - ++v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - v--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - --v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - p++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - ++p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - p--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } - --p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++2a } } + v++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + ++v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + v--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + --v; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + p++; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + ++p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + p--; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } + --p; // { dg-warning "expression of .volatile.-qualified type is deprecated" "" { target c++20 } } return v + i + *p; } @@ -55,45 +55,45 @@ fn2 () vi = 42; vi = i; vi = i = 42; - i = vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - &(vi = i); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + &(vi = i); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } (vi = 42, 45); - (i = vi = 42, 10); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + (i = vi = 42, 10); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } i = vi; // LHS not volatile. i = (vi = i, 42); static_cast<void>(vi = i); - static_cast<void>(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + static_cast<void>(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } (void)(vi = i); - (void)(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + (void)(i = vi = 42); // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } // Unevaluated operand. decltype(vi = 42) x = vi; decltype(i = vi = 42) x3 = i; // Compound assignments. - vi += i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi -= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi %= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi ^= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi |= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi /= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi = vi += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - vi += vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + vi += i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi -= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi %= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi ^= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi |= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi /= i; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi = vi += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + vi += vi = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } i *= vi; - decltype(vi -= 42) x2 = vi; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + decltype(vi -= 42) x2 = vi; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } // Structured bindings. int a[] = { 10, 5 }; const auto & [cxr, cyr] = a; - const volatile auto & [cvxr, cvyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++2a } } - volatile auto & [vxr, vyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++2a } } + const volatile auto & [cvxr, cvyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++20 } } + volatile auto & [vxr, vyr] = a; // { dg-warning ".volatile.-qualified structured binding is deprecated" "" { target c++20 } } } void fn3 () { volatile int i, j, k = 0; - i = j = k; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = j = k; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } ACCESS_ONCE(j); @@ -102,13 +102,13 @@ fn3 () volatile U u; u.c = 42; - i = u.c = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - u.c += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + i = u.c = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + u.c += 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } volatile T t; t.a = 3; - j = t.a = 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - t.a += 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + j = t.a = 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + t.a += 3; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } volatile int *src = &i; *src; // No assignment, don't warn. @@ -130,8 +130,8 @@ void raccoon () { volatile T t, u; t = 42; - u = t = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } - t &= 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++2a } } + u = t = 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } + t &= 42; // { dg-warning "assignment with .volatile.-qualified left operand is deprecated" "" { target c++20 } } } void diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile2.C b/gcc/testsuite/g++.dg/cpp2a/volatile2.C index 1a7889a6a8cb..92526b5058bd 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile2.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile2.C @@ -1,5 +1,5 @@ // PR c++/91361 - P1152R4: Deprecating some uses of volatile. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-volatile" } #define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) diff --git a/gcc/testsuite/g++.dg/cpp2a/volatile4.C b/gcc/testsuite/g++.dg/cpp2a/volatile4.C index 2148cdeb3d15..e22ee6c95689 100644 --- a/gcc/testsuite/g++.dg/cpp2a/volatile4.C +++ b/gcc/testsuite/g++.dg/cpp2a/volatile4.C @@ -1,5 +1,5 @@ // PR c++/91361 - P1152R4: Deprecating some uses of volatile. -// { dg-do compile { target c++2a } } +// { dg-do compile { target c++20 } } // { dg-options "-Wno-deprecated" } #define ACCESS_ONCE(x) (*(volatile __typeof(x) *)&(x)) diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 7c41c4e15392..f425bac3fb97 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,8 @@ +2020-05-13 Jason Merrill <jason@redhat.com> + + * include/cpplib.h (enum c_lang): Change CXX2A to CXX20. + * init.c, lex.c: Adjust. + 2020-05-12 Nathan Sidwell <nathan@acm.org> EOF location is at end of file diff --git a/libcpp/charset.c b/libcpp/charset.c index d9281c5fb976..db47235b8471 100644 --- a/libcpp/charset.c +++ b/libcpp/charset.c @@ -1021,7 +1021,7 @@ ucn_valid_in_identifier (cpp_reader *pfile, cppchar_t c, If the hexadecimal value is larger than the upper bound of the UCS codespace specified in ISO/IEC 10646, a pedantic warning is issued - in all versions of C and in the C++2a or later versions of C++. + in all versions of C and in the C++20 or later versions of C++. *PSTR must be preceded by "\u" or "\U"; it is assumed that the buffer end is delimited by a non-hex digit. Returns false if the diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 2b1e33f94ae9..7f47402f9b96 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -173,7 +173,7 @@ enum c_lang {CLK_GNUC89 = 0, CLK_GNUC99, CLK_GNUC11, CLK_GNUC17, CLK_GNUC2X, CLK_STDC2X, CLK_GNUCXX, CLK_CXX98, CLK_GNUCXX11, CLK_CXX11, CLK_GNUCXX14, CLK_CXX14, CLK_GNUCXX17, CLK_CXX17, - CLK_GNUCXX2A, CLK_CXX2A, CLK_ASM}; + CLK_GNUCXX20, CLK_CXX20, CLK_ASM}; /* Payload of a NUMBER, STRING, CHAR or COMMENT token. */ struct GTY(()) cpp_string { @@ -484,7 +484,7 @@ struct cpp_options /* Nonzero for C2X decimal floating-point constants. */ unsigned char dfp_constants; - /* Nonzero for C++2a __VA_OPT__ feature. */ + /* Nonzero for C++20 __VA_OPT__ feature. */ unsigned char va_opt; /* Nonzero for the '::' token. */ diff --git a/libcpp/init.c b/libcpp/init.c index a3cd8e28f626..1f8996af47f0 100644 --- a/libcpp/init.c +++ b/libcpp/init.c @@ -117,8 +117,8 @@ static const struct lang_flags lang_defaults[] = /* CXX14 */ { 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0 }, /* GNUCXX17 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, /* CXX17 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0 }, - /* GNUCXX2A */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, - /* CXX2A */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, + /* GNUCXX20 */ { 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, + /* CXX20 */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0 }, /* ASM */ { 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; @@ -533,8 +533,8 @@ cpp_init_builtins (cpp_reader *pfile, int hosted) if (CPP_OPTION (pfile, cplusplus)) { - if (CPP_OPTION (pfile, lang) == CLK_CXX2A - || CPP_OPTION (pfile, lang) == CLK_GNUCXX2A) + if (CPP_OPTION (pfile, lang) == CLK_CXX20 + || CPP_OPTION (pfile, lang) == CLK_GNUCXX20) _cpp_define_builtin (pfile, "__cplusplus 201709L"); else if (CPP_OPTION (pfile, lang) == CLK_CXX17 || CPP_OPTION (pfile, lang) == CLK_GNUCXX17) diff --git a/libcpp/lex.c b/libcpp/lex.c index 043852d14e20..f0ee0f9d4f6c 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -1372,7 +1372,7 @@ maybe_va_opt_error (cpp_reader *pfile) system headers. */ if (!cpp_in_system_header (pfile)) cpp_error (pfile, CPP_DL_PEDWARN, - "__VA_OPT__ is not available until C++2a"); + "__VA_OPT__ is not available until C++20"); } else if (!pfile->state.va_args_ok) { @@ -1380,7 +1380,7 @@ maybe_va_opt_error (cpp_reader *pfile) variadic macro. */ cpp_error (pfile, CPP_DL_PEDWARN, "__VA_OPT__ can only appear in the expansion" - " of a C++2a variadic macro"); + " of a C++20 variadic macro"); } } @@ -2994,7 +2994,7 @@ _cpp_lex_direct (cpp_reader *pfile) buffer->cur++, result->type = CPP_LESS_EQ; if (*buffer->cur == '>' && CPP_OPTION (pfile, cplusplus) - && CPP_OPTION (pfile, lang) >= CLK_GNUCXX2A) + && CPP_OPTION (pfile, lang) >= CLK_GNUCXX20) buffer->cur++, result->type = CPP_SPACESHIP; } else if (*buffer->cur == '<') diff --git a/libcpp/macro.c b/libcpp/macro.c index 2573f316bf51..dc4366ffefd3 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -1035,7 +1035,7 @@ _cpp_arguments_ok (cpp_reader *pfile, cpp_macro *macro, const cpp_hashnode *node if (argc < macro->paramc) { - /* In C++2a (here the va_opt flag is used), and also as a GNU + /* In C++20 (here the va_opt flag is used), and also as a GNU extension, variadic arguments are allowed to not appear in the invocation at all. e.g. #define debug(format, args...) something -- GitLab