summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-05-13 15:15:13 -0400
committerJason Merrill <jason@redhat.com>2020-05-13 15:16:49 -0400
commitb04445d4a809eaf0460fd4f1f35b1a7d458c8c72 (patch)
tree1d745c4af52475c2d51a48a637c14c520fa9664d
parentc3cb34c632222093718fc55f45dde68e97abf9dc (diff)
downloadgcc-b04445d4a809eaf0460fd4f1f35b1a7d458c8c72.tar.gz
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.
-rw-r--r--gcc/c-family/ChangeLog10
-rw-r--r--gcc/c-family/c-common.c2
-rw-r--r--gcc/c-family/c-common.h4
-rw-r--r--gcc/c-family/c-cppbuiltin.c4
-rw-r--r--gcc/c-family/c-opts.c28
-rw-r--r--gcc/c-family/c-ubsan.c4
-rw-r--r--gcc/c-family/c-warn.c4
-rw-r--r--gcc/c-family/c.opt8
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/call.c10
-rw-r--r--gcc/cp/class.c10
-rw-r--r--gcc/cp/constexpr.c38
-rw-r--r--gcc/cp/constraint.cc2
-rw-r--r--gcc/cp/decl.c34
-rw-r--r--gcc/cp/init.c6
-rw-r--r--gcc/cp/lambda.c2
-rw-r--r--gcc/cp/lex.c2
-rw-r--r--gcc/cp/method.c18
-rw-r--r--gcc/cp/name-lookup.c40
-rw-r--r--gcc/cp/parser.c102
-rw-r--r--gcc/cp/pt.c20
-rw-r--r--gcc/cp/tree.c4
-rw-r--r--gcc/cp/typeck2.c8
-rw-r--r--gcc/dwarf2out.c2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/aggr1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/array-conv9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/attr-likely1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/attr-likely2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/attr-likely3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/attr-likely4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/class-deduction-aggr2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/class-deduction-alias1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/class-deduction-alias2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/comma5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-alias.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-alias3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-alias4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-alias5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-class.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-cmath.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-complete1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-constrained-parm.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-conv2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-decltype.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-dr1430.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-inst4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-explicit-spec6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-feature-macro.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-fn1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-fn2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-fn3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-fn4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-friend1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-friend2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-friend4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-iconv1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-inherit-ctor6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-lambda5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-locations1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-member-concept.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-memfun-err.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-memfun.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-memtmpl1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-noexcept1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-partial-spec6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-placeholder1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-placeholder2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr65552.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr65634.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr65636.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr65848.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr65854.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr66844.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr66962.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67070.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67147.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67148.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67178.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67210.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67217.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67225-5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67319.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67427.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67654.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67658.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67684.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67692.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67697.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67719.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67774.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67825.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67860.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67862.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr67969.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68093-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68372.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68434.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68683.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr68812.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr69235.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr71368.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr71385.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr71965.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr78752.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr79759.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr80746.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr80773.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr82507.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr82740.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84140.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84551.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr84810.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr85808.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr86269.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr87441.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-pr92078.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-recursive-sat3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-requires9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-return-req1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-template-parm9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-traits2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-ts6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts-using1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/concepts6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/cond-triv2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/consteval-void1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dtor2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dtor3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dtor4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-dynamic9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-init9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-new9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-typeid1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-typeid2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-typeid3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-union1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-virtual14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constexpr-virtual15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/constinit9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/desig13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/desig2.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/destroying-delete4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/explicit14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/explicit15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/inline-asm2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/inline-asm3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/is-constant-evaluated9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-generic-variadic20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-generic5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-generic7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-mangle.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-pack-init1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-pack-init2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-pack-init4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-pack-init5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-this3.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/multiple-deleted-destroying-delete-error-2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nested-inline-ns2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/no_unique_address1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-constructor.c2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-once.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-nonstring.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-reason-only-one.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nodiscard-reason.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class27.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class31.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class32.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class33.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class34.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class35.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class36.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class37.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/nontype-class9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/paren-init9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/pr88534.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/pr88537.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/pr89913.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-constexpr2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-decltype1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq1a.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-eq9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-err1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-err2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-err3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-err4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite3.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-rewrite4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-scalar1a.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-scalar2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-scalar3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-sfinae1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth-neg3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth1a.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth2a.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth2b.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth3a.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-synth8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/spaceship-weak1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/srcloc9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/typename9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/ucn2.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-ctad.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp-neg2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/udlit-class-nttp.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/volatile1.C66
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/volatile2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp2a/volatile4.C2
-rw-r--r--libcpp/ChangeLog5
-rw-r--r--libcpp/charset.c2
-rw-r--r--libcpp/include/cpplib.h4
-rw-r--r--libcpp/init.c8
-rw-r--r--libcpp/lex.c6
-rw-r--r--libcpp/macro.c2
467 files changed, 703 insertions, 682 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 0be10ad7618..7bd78c085da 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 d164f1e2f1f..b1379faa412 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 3e26ca034ca..7c1a6370aae 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 db91a36794a..a7d65d63934 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 58ba0948e79..bd617d3df18 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 1d0a65b3b03..06a96399e64 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 f6b3afc727c..c32d8228b5c 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 c49da99d395..89a58282b3f 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 7515827d7ae..11b3fdc0bc7 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 85d670f52f9..940e65da631 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 b66b8d4725d..15f490da3fc 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 706d8a13d8e..04faabc0258 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 4ad17f3b7d8..3a17005232e 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 1b6a5672334..37ab4818486 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 e2e547afd96..56715d6be97 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 b55c2f85d27..c94fe8edb8e 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 37282d56973..8a69bc4f170 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 47f96aa845e..3f8842bf494 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 9b68b15be60..4928b607589 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 f1ddef220fe..bc1ee21e8ce 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 7911293571e..f0cb7a2acb7 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 d526a6311e0..2090cbf7da7 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 d407e4cbfa4..af84c257e96 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 396446f7670..fad5eb4c2e5 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 73a257cead9..ea599237ab1 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 a072b29191d..04a531c356e 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 1156ea32df5..b0dd81984bb 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 9908b7e9118..96b65a59795 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 793e85d7b1c..8406b999dd5 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 033a74683a7..17f917af737 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 bfb39d1c12c..1413971aaa2 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 3313ed466fb..a879099d542 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 5245d830f1f..37e9e0546f6 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 3d92b401247..1ce041e8f2a 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 979c69b0555..3f6f92c1fed 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 34678f5cead..e1058cd83d5 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 c2389c82273..dc1064005fc 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 07c709ff10f..1ea1a69c2ff 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 635c7679a21..77a07ea038d 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 63318c53e09..4081cce57ba 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 43de249bd5a..03b210d5f2d 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 6c59610528e..ee178dec9c5 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 bb1265ddb6e..6e37dbdc980 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 bf0dc4c5d4e..0a96edc3183 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 61ba65a1333..f7bd72b7f45 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 896554f610a..2fdf4e8f89f 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 ed47eb38f1b..6890d0a1f89 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 d855f7d11ce..07876a4a496 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 8ffe5d74e61..d9c140db23a 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 15fd26ab400..995944f500e 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 23183ad7bc2..0d149c7a9af 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 68d19c09ccf..acf5d43ad5d 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 862879169fb..b8089679772 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 02e960ad40a..2ac9ae2ff72 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 d37ce6a51e8..26b3d4a2cbb 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 907b0c2e357..a565de66412 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 aca5c44c48f..b50cb421b3b 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 b090c3a3719..d13100b96f9 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 25c4ca064ce..63f36965f00 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 bb7e31d8b6c..18564c8da13 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 821042f44ee..f61f2602b78 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 db3cfdf3cb2..13733c645f3 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 91eefee602a..80047691004 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 14d994c9b04..5cbf64a8cd3 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 6074bc78682..5756b0d73a6 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 03ec9e9a698..105f39e45fc 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 81bc081abbb..562fc138cfd 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 d54bcdb3211..2fe479934a8 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 4103714b004..99f83cba6cf 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 76c6fb9bd34..3f2d62c94fd 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 0634eafb248..471eaba773f 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 b682b0d8846..a15749a88be 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 13f04d77594..e726e1cc91e 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 56fbb683868..50a08328755 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 9287ab8e5d7..238eb819e90 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 ddf99aa9933..c8590b4074b 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 b25adcc17c0..f33251987f7 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 8a29ca9360c..4fca936db2b 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 e3740d5170e..fe80460c9c5 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 6aa9d961779..d5f700c7d39 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 88f9fe825f8..90ab8f0305d 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 4e2d13f8eb3..4ddf516b1a9 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 aa244bc04c1..b858e2770d1 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 34eaf22c26c..7fe930cd865 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 c92d6ac774c..ad29068e49f 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 ef1968899f6..61595749f71 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 a7419d69a46..44b509dd380 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 96da7852a70..291e451ca1a 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 dfb5f3bcc5e..daaaf31cf6c 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 fe471899c14..ee9180e2866 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 6c81c1476ab..c841daec7f2 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 f3a2d064dbd..cec45b46aa0 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 acfa188af21..8867b7bf3a1 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 f6ad5196352..77e10c6b5c7 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 ee28d5b7754..7ddfe62590c 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 418040aa56e..987bf27f784 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 5ba3ab19c23..fb3272632c7 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 f33f74969b7..8774d4f6fd7 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 2bb4bacb2ef..9e455d5d3a2 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 cbea81d6b21..887fe4df3a9 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 b04354cf8d0..9e6fd16c368 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 5af2a40e9a3..7176efbc608 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 52f24ec90be..54405f2ca6e 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 b99a3433f6c..1bcc051243f 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 b246d254bc3..2868f9cfadc 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 53bb9a355f1..93dc32de922 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 c32f4d1184b..afeee5927e5 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 ca57a0915f1..c6dfe5d1c79 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 88017dc723f..fbaac1c34a3 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 db8c37e2191..1e83fbae3bf 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 c5939960a14..97f80cfcfa8 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 7154fc2b7fe..c74f6f00a5c 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 044e677363c..a31750eb495 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 35618aed5d3..b1a7a8c333a 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 500e6314119..d59d4f95bfb 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 62181768dcc..f8d99ffe006 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 d08efb661f0..937098d394f 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 0ef5ed87264..e37ad28c1bc 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 9a25831f4a2..92f42982a38 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 6eb1c440ed4..5399780cfbf 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 fcad30183d6..fad43be6c5b 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 27ee205a7fc..5087344d2c9 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 087f4fc83ae..530cb333f38 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 35e92954414..392492214e2 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 139ecd6d798..c712d727235 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 44c077b16a1..27083371ae1 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 d28b44559bd..c3c5c235455 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 d363c59f6d5..5ee5c2dac8f 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 fff414b8eb2..64cd9d2d336 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 8bad0319a05..693237fa783 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 222e5280913..b42ce8b7c30 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 4f2ab510389..b809553c07a 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 bf952103841..bc679a71f9c 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 91e3c80653d..2dd46dae6d7 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 d1416ebc99c..9fc90ff39a6 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 23ecf4de2bc..1fbda9f9ca0 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 f11d69f75fd..0a8715d91cc 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 2d809e85914..324b3ad8b37 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 5e96d0e7b7d..1df563b341c 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 c67e632d443..d83440d49c6 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 f31997c920d..aee27bc0c98 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 4619cf993af..cdad62ca440 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 40eeaa7d57b..447b149b80c 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 a99103c97dd..5fdd64eb26f 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 69e2fbec4d8..1a0008e7a98 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 34b96c59582..92e89da5451 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 f7438552ca9..81a671c7b1a 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 6e0f062c14b..01a42a4e73f 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 83a9083cf17..b604f7e00bf 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 e40796f4975..ef1d278e99b 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 b330e4be051..8d7cb89f3f5 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 bcba830bc0d..f32ca63d5ee 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 4428ee1796c..6fb430d90a3 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 bcd4ba54071..28be9e9e0ea 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 ad24da9cb47..1c25252d47b 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 9bfb896cc78..6df9b852fb1 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 ee83d560cf6..22696c30d81 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 d76f12eb209..992fcbbfccb 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 b8ca9164792..679f5cfbf69 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 7afd34d11fd..03668d34384 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 bb0e3b0667f..0364d2e3138 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 be6409ebad8..816a37c10b7 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 c8e3cfd5c63..2d8c2911a9c 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 8ba38625834..062d22c5aee 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 e2893c061de..06908a419e0 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 9b82061af11..27af524f7ba 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 b9532a36eb5..cb2ac5d9311 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 1ec1d59fc84..6b665ac52ea 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 c97704565a1..9d8ec94f696 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 071a838f754..b020250da50 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 282dba63e29..a9b422b5bac 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 089db2ba013..5f7aec5b281 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 1d21cce7eee..bc38b893c68 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 bbcba0d5806..292ce20ee73 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 61aa72d0452..3153afa4c4d 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 2f912b13d6a..976efe67c46 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 d9899250342..a4e4402a6cf 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 89057c42441..8101d03100b 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 0d61a0ab313..0170042b2ad 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 3594176627f..c9ff9cace6e 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 1d005f059d0..84c9ae9d6da 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 4ff401a98e9..39e0d7d8ac7 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 239b485f717..047c19e95ac 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 7c1d69b38d1..3bb2f576a87 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 78b6f1c799b..46c50a6ef5c 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 47c8ef72c90..c7d9964f738 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 adcffed060c..265d8947957 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 d578b354084..00cc21067ce 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 2bdd3d370c2..18baac48e4d 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 b3acec15986..1cefe3b243f 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 f731bac8c2a..d28002c035a 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 434a5e2651b..9d47a7a083d 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 aa96621d9cf..23ed929acf4 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 cdc40df4387..06244882167 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 bf665aa6308..597ad5e1ae1 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 733382db0f5..adfecf85c13 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 5839207177c..ebeeebf60bb 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 a99343fc04d..87adf8c7a69 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 d3b45f7ddaa..04e7ee6f892 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 34dacade330..4ccfd0805b7 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 388fad7514b..5f08ae383ed 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 24ac2aa4095..ed8028f8540 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 d69628b0318..0524bb90a80 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 554f8a3328a..531ec1c4c72 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 783cf4c7ef7..b572650626a 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 397cfb0f1a1..7b3903c24eb 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 d9461836970..193ae93933d 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 68ad69c186d..ad03987f890 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 e8ba63d9609..c37753b05c5 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 c226292a07d..f9f82236d15 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 8dfa03a9cd5..9ee93c334e9 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 0ce9beb8d72..4aedf9893ad 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 203067a2581..1df0772b499 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 f739c6df94b..cc1cadae3bc 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 fcf507289c4..aed95c29585 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 f0394d130a3..1d2b8cbebbf 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 c574e755103..a26678e6ed7 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 346f9f56470..25d98c2b661 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 aae03f691ca..2e5ea0e7eb4 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 c3e09808e32..9caeb241df6 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 6f42d20ec41..da647bfca5e 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 743b3018d2f..77c7043a6fd 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 23434734e26..d67c3072b54 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 d71497aae6d..bc3efd05bcc 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 8056f30bb99..1958cae441d 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 d8cbb2f2f0d..7d42ffa5a78 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 ab7b89da9e8..75984a2fdcb 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 74bf8e6677b..3834457a276 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 1c7836a674a..79ad61895b0 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 7d3d3729b31..4eb8753906a 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 3d4460a0eb8..96140e6c212 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 6ab6abf1505..1335e51c853 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 f80d3f2c27c..3cfc23a210e 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 16db2974f2a..87de38a678d 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 34d9fe58ecb..ec362ad9160 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 541da1c023f..d0d0411f99d 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 dd2735289cb..1c0c0183cd0 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 dd614ede2c6..78f3ebd74f6 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 0d21f26da0e..a9e717d91f9 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 a2994f5272c..a1634aab031 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 dd2741efa8c..2e62b5377b1 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 0d5a4a79c90..8bb9a9c8dbc 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 b44098cc89b..1ac14c22319 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 5d1b7ef1019..a936c1e1294 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 bc5e6e5c78a..6f6b11c2481 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 2bf359a350f..5adf13e6a04 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 04f75975c97..fcf398f000e 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 21219039152..6762c24a342 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 d3733e831b6..0c513bd9f12 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 6e7880adcb2..70b841208f8 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 b9bd5ea19c1..4be1bf041fa 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 b2b65f2ba82..2bb407a4b51 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 5c0c2b6f967..d51bdbb8269 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 5fc130e4432..bb60a8ee91b 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 f13da104439..e61323adaed 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 f99f0808f7c..db45cdf72dc 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 a81f649b44b..32f63a51e42 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 51c8fb451b8..495914f1cca 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 38b9e609a9f..e58026ac620 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 c38167ad798..ac8aa5f669c 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 b29d3f6aefb..db00a3f6f28 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 cb55aa3bb56..88229cfd848 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 9d1c0289a62..1dc00eaff6f 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 a50f285ecb1..b678788541e 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 ab3715b2064..e8b3bcb570b 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 b5b736f87c2..cc6569b2277 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 72bfab667b8..86a058b632c 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 32594334330..29e8b51326d 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 1db16feafcb..a29c594657a 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 748a7ffa3a9..0630e18ee0c 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 3d21f48dbee..951c6fe1852 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 c6b2975350c..50bc13f2ce9 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 4c7f8925169..9c5c848f7fc 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 442e8b74aa4..a931e348604 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 7a036182062..c993134fea0 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 329588be7ab..210a5a54c34 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 2592c0757a3..10cb80acfd1 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 112fb0ad67e..9cc495e6d72 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 c122cee4942..2bf0c09cefc 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 9c3acc32ac4..3e510feee23 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 e0058f6dc87..939456c93f0 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 6038c111eb0..874e4cd3e29 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 b636e3b2d87..a7476b1d9d1 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 37833698992..0e96a1a3729 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 3d69dbb8e98..ab1a4e42bd9 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 e608e9520bf..44306113760 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 bedba683671..de457420530 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 8ee9b0327a5..35abc9179e7 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 89c63532831..e5942ac0550 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 55d689dbc67..e950d657574 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 e7c815b92d4..b49e26dc7a3 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 492fc479e94..5fcf41b1a1f 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 b2d30d64e5a..3e00e68e906 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 8a1703304ab..816b6e994de 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 a04262494c7..01ad27f1151 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 24d2e701e44..c66c6f8353f 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 f29a59e26fd..d8b20bdc2a4 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 3c9b1e1cd45..994d184b643 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 e75a1270c72..f12273910d3 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 7fb05c3ce9c..dc19004d3a1 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 0396f9ff10d..7d5aa316e93 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 41028824ce8..efe3691d8c9 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 3692154f9be..966da0cc3fa 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 e32d447819e..f512ae7a0f7 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 01e41424bc7..e7024babe54 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 314e2e9b697..5db55c41987 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 9b5f2cab47b..a1cbe52124b 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 dd019393f28..9cc8b94abb4 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 a5c2c6514cf..9af4e59c3dc 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 78349715aae..c810fd0daad 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 76692e732c4..d81baf0ebcd 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 d42f4dc7bbe..6104a5ffa08 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 5fda058c9ee..2db2303c72d 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 a3334fc7d48..8f3b32948d0 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 5cc179300ca..31520c8de1b 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 8a06d23904b..502a835bc96 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 11f8c12f3ff..824f0b40141 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 14c601ba040..035dbb161e9 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 9cc14460734..3d451a90b11 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 d684785a77f..1142974495d 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 3afb5d24261..8ed742ff625 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 ca5f68e1611..2e1433939dc 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 22f47884d08..5319ca1e583 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 91267aca383..fe87ffc5404 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 2785f947544..6811c2741bb 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 5d3479c345e..4b4d32989ca 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 c58fe05b9dd..7f3d3620fef 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 026855f0bc6..193095b237d 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 ab9e80fd335..134d1bf4d98 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 aa96de36a80..6c703b7f8ed 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 67d6f094968..279d4d00e36 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 315e0ac2309..7707f439aad 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 23eae64c64b..ae64fac81c2 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 80b9b499355..a8b05fe8380 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 2d2e9690a06..a3c1446af5d 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 0c0fcf6be33..750accdd525 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 b2e174c7fd3..44b8338b0ae 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 329b3129e1b..dbecf91c46d 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 6a4dac5c90e..9c6d6f93bda 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 1b9dfb88918..7a1b9e66f0c 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 2d3ba018618..acbc62151f8 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 78cf0a39c81..7d0126c64fb 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 1c1e23c10a8..8371eb96621 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 5649fa2e6dc..f5e9826d243 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 fc0e7c9655d..6235fc8f3f5 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 8c39cd72715..67c57099f74 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 246fab6c178..377a151d343 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 15389e18537..436f4fdfe11 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 47fc9c7f5c0..af22a9389be 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 737f712be47..d62be58d57d 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 a54b2ccaf6d..316c162dd52 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 5c70d9d59ee..8e635de4514 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 82ca2669545..638e9c2ecca 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 d7be6f2b55d..c53b4b53542 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 4b9107c70ff..31c7d4e1669 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 4311dd4df59..ddaea8fd90d 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 c8ed924877e..dd991aec8c8 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 0aea493f214..40a65a573cf 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 73643fa3aa2..065e16a21be 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 e9e90d7acb6..f1221b286e8 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 05da7604686..4dcc94d5630 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 cfd37193f66..f8e6c4bee1c 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 1b2959e7731..ac7ab9c5808 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 6038f63be5a..b6761ddb85d 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 4e97bbc5b56..261bcbffb45 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 53855a9ef9e..011ff318536 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 0b98ebf43bb..cf1edb6bdf9 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 f444005a09f..ebfa8db033a 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 f8c7bd10b63..0bfddf0bbb8 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 a64cb00ebbc..6d2efd70731 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 b5d97dcb3d8..96a32844528 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 32af1a7265c..81f909e943b 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 30e71650bc9..6433c17f55d 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 c44b206feb8..7058d274c1d 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 54faf385f11..2da38142bf0 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 d558d45f578..8d59643037b 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 c06847e67c3..8ef9b1e2830 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 9d008f19fea..6ccc7e8507b 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 02f92b10aef..2610864f29c 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 bc673b2e020..217e34fe79f 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 19a03fb04df..88e2d36988e 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 7e98c472cd1..1e26e57f065 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 06b988f6e57..8de75bd2f3b 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 490726de56f..d31faef095d 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 d89fc885e50..66b228d07af 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 ac24f366c94..429d31a2212 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 f804e133714..265d075ab18 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 8112eaa4f80..b1351886176 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 aabbd324d86..61bcde55d1c 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 4f5df226410..5533481a61b 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 ce7b56ce574..905b60086d9 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 6461c6ab60a..56ab343c9a7 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 e756ebca945..825bd7032a7 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 00f90ced255..b044914bbfc 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 bb60302622f..c4030cd2f4d 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 ef29cffbd0b..d0e4a892225 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 c068b5ab294..f3488ea0754 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 182bf2b9092..6e08acf2b20 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 0d1dd63d368..c4971aafc03 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 552c92aa5bd..3607c816664 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 d3cb0a6b0f0..9d96944399a 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 7dacaf4b81d..e6baaa262c7 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 6a03f54b91a..eb199186153 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 f9b2dc449e2..6c35f70ea6c 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 ecc249a67b7..486db6cbbf9 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 45ce4ee047a..a4d8b32922f 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 2a35de99e09..1872fb5382c 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 32314579dcb..899a83c80b3 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 cf23c9771e0..e6401d29ef0 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 11fe32f86dc..959e376b446 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 2632f525aad..65915ce6c0a 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 0fc5aa2c9b8..aac0013725d 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 89f84899fcc..20da546d82a 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 033578122ae..291f6e839cf 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 8e4aa864b27..49f88f6f694 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 e8296bbb60a..4765601f239 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 86b661ca6e0..7cb201416f9 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 d0d68c7fa6f..bd1c4d2af2f 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 83547691118..bc1ec63113a 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 1ff39549973..400d9931b66 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 c88bc146a5d..6e19ff77756 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 a27016d1e36..1be78d9f7bd 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 742a8925e54..abc850fcd43 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 900e5a8cab8..49a7e569b7f 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 890931236b8..ee7b1248354 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 21ab8311d36..2730143c6ee 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 380d83428cf..5ef09bbb1b1 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 b841ff6ceaa..29587e4ebb5 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 c8c5f513931..c10f64b95d2 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 0e89a00a13c..ce7170b6dce 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 a389add2e7c..89c6887cb46 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 2a8b569a1af..ef56edf9426 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 db56bb5ff90..caef812b464 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 01ba00aaf41..47fce003913 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 0c1f6309c5b..726c9df5c88 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 1413268ba16..cdd1465d010 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 ed7ad958f62..5dd81f105ca 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 97962e53d65..99a235961a3 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 c439f726c5d..5aa5a516cd4 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 4750db35cd8..8d82b6b8d34 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 9094190cec9..72476712562 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 7f4242a1dba..bb6d528201f 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 bf534f1717f..5f8be8f9e01 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 7c926177004..4a2a1cde53e 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 e64aa0316ef..55ad378c1b1 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 69154e7daaf..fc65eee85cf 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 97c27adafcc..6913d088dce 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 e96e2ab802c..8b5a4533f8b 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 713db51d972..2354fafcfa0 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 3ebfde45ec5..afba0f83b31 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 7b1865222b3..70f9e3996f8 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 2e6ce11d2e7..ee7011b4a3b 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 437fa9b5ab8..b91e01ce0b3 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 89bb5d39d7d..067fdbac81e 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 f6877a960c9..e9421bc4072 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 8f7e3f29511..85b3fe7fc61 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 71ba8f981a0..62cb86ae695 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 dcaca3e4070..b7ef79d68a0 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 e47591b13bc..7ea6b477ca2 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 1a7889a6a8c..92526b5058b 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 2148cdeb3d1..e22ee6c9568 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 7c41c4e1539..f425bac3fb9 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 d9281c5fb97..db47235b847 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 2b1e33f94ae..7f47402f9b9 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 a3cd8e28f62..1f8996af47f 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 043852d14e2..f0ee0f9d4f6 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 2573f316bf5..dc4366ffefd 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