From: Marek Polacek Date: Sat, 20 Oct 2018 17:21:19 +0000 (+0000) Subject: *.C: Use target c++17 instead of explicit dg-options. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=be515b4ce0891e0019511d65c2073e0ebf9f9309;p=gcc.git *.C: Use target c++17 instead of explicit dg-options. * g++.dg/*.C: Use target c++17 instead of explicit dg-options. * lib/g++-dg.exp: Don't test C++11 by default. Add C++17 to the list of default stds to test. From-SVN: r265343 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 86fa75673ef..eff5d08faed 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-10-20 Marek Polacek + + * g++.dg/*.C: Use target c++17 instead of explicit dg-options. + * lib/g++-dg.exp: Don't test C++11 by default. Add C++17 to + the list of default stds to test. + 2018-10-20 Jakub Jelinek PR middle-end/87647 diff --git a/gcc/testsuite/g++.dg/concepts/alias1.C b/gcc/testsuite/g++.dg/concepts/alias1.C index 1b643cdd1c9..279a4787576 100644 --- a/gcc/testsuite/g++.dg/concepts/alias1.C +++ b/gcc/testsuite/g++.dg/concepts/alias1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias2.C b/gcc/testsuite/g++.dg/concepts/alias2.C index 2de2aa4da94..06ffb1af529 100644 --- a/gcc/testsuite/g++.dg/concepts/alias2.C +++ b/gcc/testsuite/g++.dg/concepts/alias2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias3.C b/gcc/testsuite/g++.dg/concepts/alias3.C index 6e1c39ce174..2901c041881 100644 --- a/gcc/testsuite/g++.dg/concepts/alias3.C +++ b/gcc/testsuite/g++.dg/concepts/alias3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/alias4.C b/gcc/testsuite/g++.dg/concepts/alias4.C index e7d93d5875f..2c9f5defeb0 100644 --- a/gcc/testsuite/g++.dg/concepts/alias4.C +++ b/gcc/testsuite/g++.dg/concepts/alias4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/auto1.C b/gcc/testsuite/g++.dg/concepts/auto1.C index 0c6fa465fa6..2682940cedd 100644 --- a/gcc/testsuite/g++.dg/concepts/auto1.C +++ b/gcc/testsuite/g++.dg/concepts/auto1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template class A { }; diff --git a/gcc/testsuite/g++.dg/concepts/auto3.C b/gcc/testsuite/g++.dg/concepts/auto3.C index 7b80fe314b8..abfb2019125 100644 --- a/gcc/testsuite/g++.dg/concepts/auto3.C +++ b/gcc/testsuite/g++.dg/concepts/auto3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template class tuple {}; diff --git a/gcc/testsuite/g++.dg/concepts/auto4.C b/gcc/testsuite/g++.dg/concepts/auto4.C index e80341ec038..4eb2ae8f7d5 100644 --- a/gcc/testsuite/g++.dg/concepts/auto4.C +++ b/gcc/testsuite/g++.dg/concepts/auto4.C @@ -1,5 +1,6 @@ // PR c++/85006 -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } template struct A {}; diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction1.C b/gcc/testsuite/g++.dg/concepts/class-deduction1.C index 476830d9252..936dd6826f0 100644 --- a/gcc/testsuite/g++.dg/concepts/class-deduction1.C +++ b/gcc/testsuite/g++.dg/concepts/class-deduction1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Isint = __is_same_as(T,int); diff --git a/gcc/testsuite/g++.dg/concepts/class-deduction2.C b/gcc/testsuite/g++.dg/concepts/class-deduction2.C index 286e59a5039..e0718d1d0cf 100644 --- a/gcc/testsuite/g++.dg/concepts/class-deduction2.C +++ b/gcc/testsuite/g++.dg/concepts/class-deduction2.C @@ -1,5 +1,6 @@ // PR c++/85706 -// { dg-additional-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-additional-options "-fconcepts" } template struct S { S(T); diff --git a/gcc/testsuite/g++.dg/concepts/class.C b/gcc/testsuite/g++.dg/concepts/class.C index 1c5242f8089..dc5523e2407 100644 --- a/gcc/testsuite/g++.dg/concepts/class.C +++ b/gcc/testsuite/g++.dg/concepts/class.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class1.C b/gcc/testsuite/g++.dg/concepts/class1.C index 94a5d23a873..a738e6e82cd 100644 --- a/gcc/testsuite/g++.dg/concepts/class1.C +++ b/gcc/testsuite/g++.dg/concepts/class1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class2.C b/gcc/testsuite/g++.dg/concepts/class2.C index 63891282085..ec8718114a7 100644 --- a/gcc/testsuite/g++.dg/concepts/class2.C +++ b/gcc/testsuite/g++.dg/concepts/class2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class3.C b/gcc/testsuite/g++.dg/concepts/class3.C index b2757567d4f..256370df46d 100644 --- a/gcc/testsuite/g++.dg/concepts/class3.C +++ b/gcc/testsuite/g++.dg/concepts/class3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class4.C b/gcc/testsuite/g++.dg/concepts/class4.C index 86eecbc4572..b583e55411d 100644 --- a/gcc/testsuite/g++.dg/concepts/class4.C +++ b/gcc/testsuite/g++.dg/concepts/class4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/class5.C b/gcc/testsuite/g++.dg/concepts/class5.C index 76398609709..7bf620edc5c 100644 --- a/gcc/testsuite/g++.dg/concepts/class5.C +++ b/gcc/testsuite/g++.dg/concepts/class5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/class6.C b/gcc/testsuite/g++.dg/concepts/class6.C index 29dcb8ff97e..bdd60918c8e 100644 --- a/gcc/testsuite/g++.dg/concepts/class6.C +++ b/gcc/testsuite/g++.dg/concepts/class6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool One() { return sizeof(T) >= 4; } diff --git a/gcc/testsuite/g++.dg/concepts/constrained-parm.C b/gcc/testsuite/g++.dg/concepts/constrained-parm.C index feaf3bb6429..c2b6614aeea 100644 --- a/gcc/testsuite/g++.dg/concepts/constrained-parm.C +++ b/gcc/testsuite/g++.dg/concepts/constrained-parm.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/debug1.C b/gcc/testsuite/g++.dg/concepts/debug1.C index eeb63654243..87f2ac90b20 100644 --- a/gcc/testsuite/g++.dg/concepts/debug1.C +++ b/gcc/testsuite/g++.dg/concepts/debug1.C @@ -1,5 +1,6 @@ // PR c++/84551 -// { dg-options "-g -O -std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-g -O -fconcepts" } template concept bool C() { return true; } diff --git a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C index caf6b2e5e3f..7ac7872efb5 100644 --- a/gcc/testsuite/g++.dg/concepts/decl-diagnose.C +++ b/gcc/testsuite/g++.dg/concepts/decl-diagnose.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" } diff --git a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C index 5eec87b3c0b..bebbda1a1fa 100644 --- a/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C +++ b/gcc/testsuite/g++.dg/concepts/deduction-constraint1.C @@ -1,5 +1,6 @@ // PR c++/67007 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool A = diff --git a/gcc/testsuite/g++.dg/concepts/diagnostic1.C b/gcc/testsuite/g++.dg/concepts/diagnostic1.C index c977eaa8fcd..9bb15060573 100644 --- a/gcc/testsuite/g++.dg/concepts/diagnostic1.C +++ b/gcc/testsuite/g++.dg/concepts/diagnostic1.C @@ -1,5 +1,6 @@ // PR c++/67159 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool SameAs = __is_same_as(T, U); diff --git a/gcc/testsuite/g++.dg/concepts/disjunction1.C b/gcc/testsuite/g++.dg/concepts/disjunction1.C index 9bd50974f57..930adf405c9 100644 --- a/gcc/testsuite/g++.dg/concepts/disjunction1.C +++ b/gcc/testsuite/g++.dg/concepts/disjunction1.C @@ -1,5 +1,6 @@ // PR c++/66962 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template struct remove_cv; template struct is_reference; diff --git a/gcc/testsuite/g++.dg/concepts/dr1430.C b/gcc/testsuite/g++.dg/concepts/dr1430.C index 9fd4f4301fc..f865d5ec2c7 100644 --- a/gcc/testsuite/g++.dg/concepts/dr1430.C +++ b/gcc/testsuite/g++.dg/concepts/dr1430.C @@ -1,5 +1,6 @@ // PR c++/66092 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/equiv.C b/gcc/testsuite/g++.dg/concepts/equiv.C index d666d9a7567..faec3543461 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv.C +++ b/gcc/testsuite/g++.dg/concepts/equiv.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check equivalence of short- and longhand declarations. diff --git a/gcc/testsuite/g++.dg/concepts/equiv2.C b/gcc/testsuite/g++.dg/concepts/equiv2.C index 694d87a2c56..2094ca9f388 100644 --- a/gcc/testsuite/g++.dg/concepts/equiv2.C +++ b/gcc/testsuite/g++.dg/concepts/equiv2.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } // template diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C index 58d8dec0db6..99bd72e069c 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C index f47b7585e62..ea313876f01 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C index 00dee2fb2b9..18d3c496f38 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C index c0f585c957a..20f43770539 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-inst4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-inst4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C index 38730680e14..bff06f21b6f 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec1.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec1.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C index 17d48e7c220..ca8b8a037bc 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec2.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C index 1edc83e95a8..fd48da1c280 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec3.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C index 963c030d464..75a2dec6f49 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec4.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec4.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C index e0d89bce2d6..d83eec11bc2 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec5.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C index 0af1df46d60..b5487072e22 100644 --- a/gcc/testsuite/g++.dg/concepts/explicit-spec6.C +++ b/gcc/testsuite/g++.dg/concepts/explicit-spec6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template struct A { diff --git a/gcc/testsuite/g++.dg/concepts/expression.C b/gcc/testsuite/g++.dg/concepts/expression.C index 6430f89e309..33dad0a47a6 100644 --- a/gcc/testsuite/g++.dg/concepts/expression.C +++ b/gcc/testsuite/g++.dg/concepts/expression.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/expression2.C b/gcc/testsuite/g++.dg/concepts/expression2.C index 3583452d47e..c5447df1d87 100644 --- a/gcc/testsuite/g++.dg/concepts/expression2.C +++ b/gcc/testsuite/g++.dg/concepts/expression2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C1() diff --git a/gcc/testsuite/g++.dg/concepts/expression3.C b/gcc/testsuite/g++.dg/concepts/expression3.C index 4148aa6511e..26b829d338d 100644 --- a/gcc/testsuite/g++.dg/concepts/expression3.C +++ b/gcc/testsuite/g++.dg/concepts/expression3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/feature-macro.C b/gcc/testsuite/g++.dg/concepts/feature-macro.C index ad2bfb080a0..d3d9b5420a8 100644 --- a/gcc/testsuite/g++.dg/concepts/feature-macro.C +++ b/gcc/testsuite/g++.dg/concepts/feature-macro.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } #ifndef __cpp_concepts #error __cpp_concepts not defined diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept1.C b/gcc/testsuite/g++.dg/concepts/fn-concept1.C index b858c1ac93f..a4ade7c628d 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept1.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Tuple() { // { dg-error "multiple statements" } diff --git a/gcc/testsuite/g++.dg/concepts/fn-concept2.C b/gcc/testsuite/g++.dg/concepts/fn-concept2.C index fe88dce1bd4..0d70728abe8 100644 --- a/gcc/testsuite/g++.dg/concepts/fn-concept2.C +++ b/gcc/testsuite/g++.dg/concepts/fn-concept2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept auto C1() { return 0; } // { dg-error "16:concept .concept auto C1\\(\\). declared with a deduced return type" } diff --git a/gcc/testsuite/g++.dg/concepts/fn1.C b/gcc/testsuite/g++.dg/concepts/fn1.C index 800a0d36f0b..17f14b9a46b 100644 --- a/gcc/testsuite/g++.dg/concepts/fn1.C +++ b/gcc/testsuite/g++.dg/concepts/fn1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn10.C b/gcc/testsuite/g++.dg/concepts/fn10.C index 71bd82c5f60..6993f34a89f 100644 --- a/gcc/testsuite/g++.dg/concepts/fn10.C +++ b/gcc/testsuite/g++.dg/concepts/fn10.C @@ -1,5 +1,5 @@ -// { dg-do compile } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Test that constraint satisfaction checks work even when // processing template declarations. diff --git a/gcc/testsuite/g++.dg/concepts/fn2.C b/gcc/testsuite/g++.dg/concepts/fn2.C index 67e35acc362..250e0a8713a 100644 --- a/gcc/testsuite/g++.dg/concepts/fn2.C +++ b/gcc/testsuite/g++.dg/concepts/fn2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn3.C b/gcc/testsuite/g++.dg/concepts/fn3.C index 6695f2f98a6..bc0e126c96c 100644 --- a/gcc/testsuite/g++.dg/concepts/fn3.C +++ b/gcc/testsuite/g++.dg/concepts/fn3.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/fn4.C b/gcc/testsuite/g++.dg/concepts/fn4.C index ecc3d7b1bee..830a1747865 100644 --- a/gcc/testsuite/g++.dg/concepts/fn4.C +++ b/gcc/testsuite/g++.dg/concepts/fn4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn5.C b/gcc/testsuite/g++.dg/concepts/fn5.C index d4a2e003b9c..018b12f86e1 100644 --- a/gcc/testsuite/g++.dg/concepts/fn5.C +++ b/gcc/testsuite/g++.dg/concepts/fn5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Check shorthand notation. diff --git a/gcc/testsuite/g++.dg/concepts/fn6.C b/gcc/testsuite/g++.dg/concepts/fn6.C index 12936076449..97155f8eb86 100644 --- a/gcc/testsuite/g++.dg/concepts/fn6.C +++ b/gcc/testsuite/g++.dg/concepts/fn6.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } // Redefinition errors. diff --git a/gcc/testsuite/g++.dg/concepts/fn7.C b/gcc/testsuite/g++.dg/concepts/fn7.C index 1df21fe9024..0052f1aee73 100644 --- a/gcc/testsuite/g++.dg/concepts/fn7.C +++ b/gcc/testsuite/g++.dg/concepts/fn7.C @@ -1,5 +1,5 @@ -// { dg-do link } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do link { target c++17 } } +// { dg-options "-fconcepts" } // FIXME: What is this actually testing? diff --git a/gcc/testsuite/g++.dg/concepts/fn8.C b/gcc/testsuite/g++.dg/concepts/fn8.C index b91f1ae9511..a3daf4e1bad 100644 --- a/gcc/testsuite/g++.dg/concepts/fn8.C +++ b/gcc/testsuite/g++.dg/concepts/fn8.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Class() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/fn9.C b/gcc/testsuite/g++.dg/concepts/fn9.C index 1efde5f744a..84ed77ce1c1 100644 --- a/gcc/testsuite/g++.dg/concepts/fn9.C +++ b/gcc/testsuite/g++.dg/concepts/fn9.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/friend1.C b/gcc/testsuite/g++.dg/concepts/friend1.C index c437c79d01f..9050b557b3b 100644 --- a/gcc/testsuite/g++.dg/concepts/friend1.C +++ b/gcc/testsuite/g++.dg/concepts/friend1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/friend2.C b/gcc/testsuite/g++.dg/concepts/friend2.C index 5f14905a738..8ef600222e5 100644 --- a/gcc/testsuite/g++.dg/concepts/friend2.C +++ b/gcc/testsuite/g++.dg/concepts/friend2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool Eq() { return requires(T t) { t == t; }; } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C index c34f832816e..5a9556531e7 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn-err.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn-err.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/generic-fn.C b/gcc/testsuite/g++.dg/concepts/generic-fn.C index 7a48e7640d0..3b10327a493 100644 --- a/gcc/testsuite/g++.dg/concepts/generic-fn.C +++ b/gcc/testsuite/g++.dg/concepts/generic-fn.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include #include diff --git a/gcc/testsuite/g++.dg/concepts/iconv1.C b/gcc/testsuite/g++.dg/concepts/iconv1.C index 38a0b17b1f8..e99254f3c27 100644 --- a/gcc/testsuite/g++.dg/concepts/iconv1.C +++ b/gcc/testsuite/g++.dg/concepts/iconv1.C @@ -1,5 +1,6 @@ // PR c++/67240 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } int foo(int x) { diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C index 952c8f61ef4..4b3f5619331 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C index b36b993098a..cb81d13e6d9 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor2.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C index c7ad84aa6e7..6f046323346 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C index 26940ba44be..43df6e67186 100644 --- a/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C +++ b/gcc/testsuite/g++.dg/concepts/inherit-ctor4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() { return __is_class(T); } diff --git a/gcc/testsuite/g++.dg/concepts/intro1.C b/gcc/testsuite/g++.dg/concepts/intro1.C index ac8a708b107..84fa6dbbed4 100644 --- a/gcc/testsuite/g++.dg/concepts/intro1.C +++ b/gcc/testsuite/g++.dg/concepts/intro1.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C = __is_class(T); diff --git a/gcc/testsuite/g++.dg/concepts/intro2.C b/gcc/testsuite/g++.dg/concepts/intro2.C index 928cc2e5487..9c7c1733c6d 100644 --- a/gcc/testsuite/g++.dg/concepts/intro2.C +++ b/gcc/testsuite/g++.dg/concepts/intro2.C @@ -1,5 +1,5 @@ -// { dg-do run } -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do run { target c++17 } } +// { dg-options "-fconcepts" } #include diff --git a/gcc/testsuite/g++.dg/concepts/intro3.C b/gcc/testsuite/g++.dg/concepts/intro3.C index 78d091d3a88..5e93f313270 100644 --- a/gcc/testsuite/g++.dg/concepts/intro3.C +++ b/gcc/testsuite/g++.dg/concepts/intro3.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro4.C b/gcc/testsuite/g++.dg/concepts/intro4.C index 2a3e2ba17e4..a7e513535aa 100644 --- a/gcc/testsuite/g++.dg/concepts/intro4.C +++ b/gcc/testsuite/g++.dg/concepts/intro4.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C1 = true; diff --git a/gcc/testsuite/g++.dg/concepts/intro5.C b/gcc/testsuite/g++.dg/concepts/intro5.C index c5fac8000c3..e7cd7a48066 100644 --- a/gcc/testsuite/g++.dg/concepts/intro5.C +++ b/gcc/testsuite/g++.dg/concepts/intro5.C @@ -1,4 +1,5 @@ -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template concept bool C() diff --git a/gcc/testsuite/g++.dg/concepts/intro6.C b/gcc/testsuite/g++.dg/concepts/intro6.C index 6624c8888a9..57b325a0e38 100644 --- a/gcc/testsuite/g++.dg/concepts/intro6.C +++ b/gcc/testsuite/g++.dg/concepts/intro6.C @@ -1,5 +1,6 @@ // PR c++/67003 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } namespace X { template diff --git a/gcc/testsuite/g++.dg/concepts/intro7.C b/gcc/testsuite/g++.dg/concepts/intro7.C index 9cb4a76740b..d5bdc7e2789 100644 --- a/gcc/testsuite/g++.dg/concepts/intro7.C +++ b/gcc/testsuite/g++.dg/concepts/intro7.C @@ -1,5 +1,6 @@ // PR c++/66985 -// { dg-options "-std=c++17 -fconcepts" } +// { dg-do compile { target c++17 } } +// { dg-options "-fconcepts" } template