]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: change -fconcepts to mean C++20 concepts
authorJason Merrill <jason@redhat.com>
Thu, 3 Nov 2022 14:51:40 +0000 (10:51 -0400)
committerJason Merrill <jason@redhat.com>
Thu, 3 Nov 2022 19:24:31 +0000 (15:24 -0400)
It was always weird that -fconcepts in C++17 mode meant the same thing as
-fconcepts-ts in C++20 mode; this patch harmonizes the flags so that for TS
concepts you always need to write -fconcepts-ts.

In the unlikely event anyone is still using -fconcepts in C++17 mode, they
can either fix their code to work with C++20 concepts or adjust the compiler
flag.

gcc/c-family/ChangeLog:

* c-opts.cc (c_common_post_options): -fconcepts no longer implies
-fconcepts-ts before C++20.

gcc/ChangeLog:

* doc/invoke.texi: -fconcepts no longer implies
-fconcepts-ts before C++20.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_template_declaration_after_parameters): Fix
concept parsing below C++20.

gcc/testsuite/ChangeLog:

* g++.dg/concepts/auto1.C:
* g++.dg/concepts/auto3.C:
* g++.dg/concepts/auto4.C:
* g++.dg/concepts/class-deduction1.C:
* g++.dg/concepts/class5.C:
* g++.dg/concepts/class6.C:
* g++.dg/concepts/debug1.C:
* g++.dg/concepts/decl-diagnose.C:
* g++.dg/concepts/deduction-constraint1.C:
* g++.dg/concepts/diagnostic1.C:
* g++.dg/concepts/dr1430.C:
* g++.dg/concepts/equiv.C:
* g++.dg/concepts/equiv2.C:
* g++.dg/concepts/expression.C:
* g++.dg/concepts/expression2.C:
* g++.dg/concepts/expression3.C:
* g++.dg/concepts/fn-concept1.C:
* g++.dg/concepts/fn-concept2.C:
* g++.dg/concepts/fn-concept3.C:
* g++.dg/concepts/fn1.C:
* g++.dg/concepts/fn10.C:
* g++.dg/concepts/fn2.C:
* g++.dg/concepts/fn3.C:
* g++.dg/concepts/fn4.C:
* g++.dg/concepts/fn5.C:
* g++.dg/concepts/fn6.C:
* g++.dg/concepts/fn8.C:
* g++.dg/concepts/fn9.C:
* g++.dg/concepts/generic-fn-err.C:
* g++.dg/concepts/generic-fn.C:
* g++.dg/concepts/inherit-ctor1.C:
* g++.dg/concepts/inherit-ctor3.C:
* g++.dg/concepts/intro1.C:
* g++.dg/concepts/intro2.C:
* g++.dg/concepts/intro3.C:
* g++.dg/concepts/intro4.C:
* g++.dg/concepts/intro5.C:
* g++.dg/concepts/intro6.C:
* g++.dg/concepts/intro7.C:
* g++.dg/concepts/locations1.C:
* g++.dg/concepts/partial-concept-id1.C:
* g++.dg/concepts/partial-concept-id2.C:
* g++.dg/concepts/partial-spec5.C:
* g++.dg/concepts/placeholder2.C:
* g++.dg/concepts/placeholder3.C:
* g++.dg/concepts/placeholder4.C:
* g++.dg/concepts/placeholder5.C:
* g++.dg/concepts/placeholder6.C:
* g++.dg/concepts/pr65634.C:
* g++.dg/concepts/pr65636.C:
* g++.dg/concepts/pr65681.C:
* g++.dg/concepts/pr65848.C:
* g++.dg/concepts/pr67249.C:
* g++.dg/concepts/pr67595.C:
* g++.dg/concepts/pr68434.C:
* g++.dg/concepts/pr71127.C:
* g++.dg/concepts/pr71128.C:
* g++.dg/concepts/pr71131.C:
* g++.dg/concepts/pr71385.C:
* g++.dg/concepts/pr85065.C:
* g++.dg/concepts/template-parm11.C:
* g++.dg/concepts/template-parm12.C:
* g++.dg/concepts/template-parm2.C:
* g++.dg/concepts/template-parm3.C:
* g++.dg/concepts/template-parm4.C:
* g++.dg/concepts/template-template-parm1.C:
* g++.dg/concepts/var-concept1.C:
* g++.dg/concepts/var-concept2.C:
* g++.dg/concepts/var-concept3.C:
* g++.dg/concepts/var-concept4.C:
* g++.dg/concepts/var-concept5.C:
* g++.dg/concepts/var-concept6.C:
* g++.dg/concepts/var-concept7.C:
* g++.dg/concepts/var-templ2.C:
* g++.dg/concepts/var-templ3.C:
* g++.dg/concepts/variadic1.C:
* g++.dg/concepts/variadic2.C:
* g++.dg/concepts/variadic3.C:
* g++.dg/concepts/variadic4.C:
* g++.dg/cpp2a/concepts-pr65575.C:
* g++.dg/cpp2a/concepts-pr66091.C:
* g++.dg/cpp2a/concepts-pr84980.C:
* g++.dg/cpp2a/concepts-pr85265.C: Pass -fconcepts-ts.
* g++.dg/cpp2a/concepts-pr84979-2.C:
* g++.dg/cpp2a/concepts-pr84979-3.C: Same diagnostics
in C++20 and below.

88 files changed:
gcc/c-family/c-opts.cc
gcc/cp/parser.cc
gcc/doc/invoke.texi
gcc/testsuite/g++.dg/concepts/auto1.C
gcc/testsuite/g++.dg/concepts/auto3.C
gcc/testsuite/g++.dg/concepts/auto4.C
gcc/testsuite/g++.dg/concepts/class-deduction1.C
gcc/testsuite/g++.dg/concepts/class5.C
gcc/testsuite/g++.dg/concepts/class6.C
gcc/testsuite/g++.dg/concepts/debug1.C
gcc/testsuite/g++.dg/concepts/decl-diagnose.C
gcc/testsuite/g++.dg/concepts/deduction-constraint1.C
gcc/testsuite/g++.dg/concepts/diagnostic1.C
gcc/testsuite/g++.dg/concepts/dr1430.C
gcc/testsuite/g++.dg/concepts/equiv.C
gcc/testsuite/g++.dg/concepts/equiv2.C
gcc/testsuite/g++.dg/concepts/expression.C
gcc/testsuite/g++.dg/concepts/expression2.C
gcc/testsuite/g++.dg/concepts/expression3.C
gcc/testsuite/g++.dg/concepts/fn-concept1.C
gcc/testsuite/g++.dg/concepts/fn-concept2.C
gcc/testsuite/g++.dg/concepts/fn-concept3.C
gcc/testsuite/g++.dg/concepts/fn1.C
gcc/testsuite/g++.dg/concepts/fn10.C
gcc/testsuite/g++.dg/concepts/fn2.C
gcc/testsuite/g++.dg/concepts/fn3.C
gcc/testsuite/g++.dg/concepts/fn4.C
gcc/testsuite/g++.dg/concepts/fn5.C
gcc/testsuite/g++.dg/concepts/fn6.C
gcc/testsuite/g++.dg/concepts/fn8.C
gcc/testsuite/g++.dg/concepts/fn9.C
gcc/testsuite/g++.dg/concepts/generic-fn-err.C
gcc/testsuite/g++.dg/concepts/generic-fn.C
gcc/testsuite/g++.dg/concepts/inherit-ctor1.C
gcc/testsuite/g++.dg/concepts/inherit-ctor3.C
gcc/testsuite/g++.dg/concepts/intro1.C
gcc/testsuite/g++.dg/concepts/intro2.C
gcc/testsuite/g++.dg/concepts/intro3.C
gcc/testsuite/g++.dg/concepts/intro4.C
gcc/testsuite/g++.dg/concepts/intro5.C
gcc/testsuite/g++.dg/concepts/intro6.C
gcc/testsuite/g++.dg/concepts/intro7.C
gcc/testsuite/g++.dg/concepts/locations1.C
gcc/testsuite/g++.dg/concepts/partial-concept-id1.C
gcc/testsuite/g++.dg/concepts/partial-concept-id2.C
gcc/testsuite/g++.dg/concepts/partial-spec5.C
gcc/testsuite/g++.dg/concepts/placeholder2.C
gcc/testsuite/g++.dg/concepts/placeholder3.C
gcc/testsuite/g++.dg/concepts/placeholder4.C
gcc/testsuite/g++.dg/concepts/placeholder5.C
gcc/testsuite/g++.dg/concepts/placeholder6.C
gcc/testsuite/g++.dg/concepts/pr65634.C
gcc/testsuite/g++.dg/concepts/pr65636.C
gcc/testsuite/g++.dg/concepts/pr65681.C
gcc/testsuite/g++.dg/concepts/pr65848.C
gcc/testsuite/g++.dg/concepts/pr67249.C
gcc/testsuite/g++.dg/concepts/pr67595.C
gcc/testsuite/g++.dg/concepts/pr68434.C
gcc/testsuite/g++.dg/concepts/pr71127.C
gcc/testsuite/g++.dg/concepts/pr71128.C
gcc/testsuite/g++.dg/concepts/pr71131.C
gcc/testsuite/g++.dg/concepts/pr71385.C
gcc/testsuite/g++.dg/concepts/pr85065.C
gcc/testsuite/g++.dg/concepts/template-parm11.C
gcc/testsuite/g++.dg/concepts/template-parm12.C
gcc/testsuite/g++.dg/concepts/template-parm2.C
gcc/testsuite/g++.dg/concepts/template-parm3.C
gcc/testsuite/g++.dg/concepts/template-parm4.C
gcc/testsuite/g++.dg/concepts/template-template-parm1.C
gcc/testsuite/g++.dg/concepts/var-concept1.C
gcc/testsuite/g++.dg/concepts/var-concept2.C
gcc/testsuite/g++.dg/concepts/var-concept3.C
gcc/testsuite/g++.dg/concepts/var-concept4.C
gcc/testsuite/g++.dg/concepts/var-concept5.C
gcc/testsuite/g++.dg/concepts/var-concept6.C
gcc/testsuite/g++.dg/concepts/var-concept7.C
gcc/testsuite/g++.dg/concepts/var-templ2.C
gcc/testsuite/g++.dg/concepts/var-templ3.C
gcc/testsuite/g++.dg/concepts/variadic1.C
gcc/testsuite/g++.dg/concepts/variadic2.C
gcc/testsuite/g++.dg/concepts/variadic3.C
gcc/testsuite/g++.dg/concepts/variadic4.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr65575.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr66091.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-2.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr84979-3.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr84980.C
gcc/testsuite/g++.dg/cpp2a/concepts-pr85265.C

index 32b929e3ece489afa9f94ee29461e37df8a0f228..9e0494b2a456c70be5775e7528ae2b1a88232966 100644 (file)
@@ -1090,9 +1090,6 @@ c_common_post_options (const char **pfilename)
      work with the standard.  */
   if (cxx_dialect >= cxx20 || flag_concepts_ts)
     flag_concepts = 1;
-  else if (flag_concepts)
-    /* For -std=c++17 -fconcepts, imply -fconcepts-ts.  */
-    flag_concepts_ts = 1;
 
   if (num_in_fnames > 1)
     error ("too many filenames given; type %<%s %s%> for usage",
index fd59de491cd9ccaf4ef71d43dea257385d64abd1..9523f73d9a308ff9cdbccd0e2814e6ab0d03810a 100644 (file)
@@ -31450,10 +31450,11 @@ 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 >= cxx20 /* Implies flag_concept.  */
+  else if (flag_concepts
            && 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.  */
+          && cp_lexer_nth_token_is (parser->lexer, 2, CPP_NAME))
+    /* -fconcept-ts 'concept bool' syntax is handled below, in
+       cp_parser_single_declaration.  */
     decl = cp_parser_concept_definition (parser);
   else
     {
index c6323a53ad279e9e0e7547fcfc95c674846eefdf..2b29db831aee04c4e118c485ebf56ddf4427e13d 100644 (file)
@@ -3075,14 +3075,14 @@ exhaustion is signalled by throwing @code{std::bad_alloc}.  See also
 @itemx -fconcepts-ts
 @opindex fconcepts
 @opindex fconcepts-ts
-Below @option{-std=c++20}, @option{-fconcepts} enables support for the
-C++ Extensions for Concepts Technical Specification, ISO 19217 (2015).
-
-With @option{-std=c++20} and above, Concepts are part of the language
-standard, so @option{-fconcepts} defaults to on.  But the standard
-specification of Concepts differs significantly from the TS, so some
-constructs that were allowed in the TS but didn't make it into the
-standard can still be enabled by @option{-fconcepts-ts}.
+Enable support for the C++ Concepts feature for constraining template
+arguments.  With @option{-std=c++20} and above, Concepts are part of
+the language standard, so @option{-fconcepts} defaults to on.
+
+Some constructs that were allowed by the earlier C++ Extensions for
+Concepts Technical Specification, ISO 19217 (2015), but didn't make it
+into the standard, can additionally be enabled by
+@option{-fconcepts-ts}.
 
 @item -fconstexpr-depth=@var{n}
 @opindex fconstexpr-depth
index e05330610fc66b823997a5846bddc3676691dd1b..abf7886c9f64a9fad970cbe7833a20011c84494a 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T1, class T2> class A { };
 
index 27a6afa4ed97e64abf1aafd33eb67e5d4a8a3dfd..868a56cf315901d4f87a5ce905ea7edfb09af55c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class...> class tuple {};
 
index 8bf3fa9b1cea4223805f964e5e3928dce7f7f988..6c984550229b140ab9801cbe57a30fb3577f891a 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/85006
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename... Ts> struct A {};
 
index 3359700775292be787f402fc3d1e477d799cbb0d..7f427d053b8855cee32057d7081c0ab4406f0ca5 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T>
 concept bool Isint = __is_same_as(T,int);
index ac9d7e83e9de0376cf69c3a1170976dad65c63f3..5f8ece965439731821771078f330bff1ccd494b9 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool One() { return sizeof(T) >= 4; }
index f2345b19b0409bde2624dc27cb9d3c73aa76646a..a1c5e166e553bbc25c883a75b9c00beaf209df9c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool One() { return sizeof(T) >= 4; }
index b9a544486ace3a784aebcca50bf5cf74e5bbe37c..fb48567249f00680613d220eaff42ad0c39b09f0 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/84551
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename> concept bool C() { return true; }
 
index 6a461a50366928256cf8a90d2da8075f63a7ae73..96038fd3dfc71e902b79991b4fa70cfb5e69ff10 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 typedef concept int CINT; // { dg-error "'concept' cannot appear in a typedef declaration" }
 
index eba57713089fe2bc5622d94a5f3bbd06c35ce0e7..d510fe00f2caa1f9b315e12ba6deed579070512a 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/67007
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class U>
 concept bool A =
index 29c78c4c730fb10e44c3c399a9f6006b675651e6..207c36c320e48a9110b5e46dd8b9fc3b3cc3f741 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/67159
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts -fconcepts-diagnostics-depth=2" }
+// { dg-options "-fconcepts-ts -fconcepts-diagnostics-depth=2" }
 
 template <class T, class U>
 concept bool SameAs = __is_same_as(T, U);
index 05c91526c20ef29172e28fa64667508451ae9477..c22a7827eba7137c95b0a02d2d609b6fb0829779 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66092
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <type_traits>
 
index 640c2b5ec0ddfb0211f94c9d4ac3be357f0af448..a5d0c1864c09ffdb2b6685af3d889788abdaf429 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do link { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Check equivalence of short- and longhand declarations.
 
index dff719b86a5399112dc6fb2d87e889231e060451..48a266498f9b7f1868a82d0c76c4d98109f2363b 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do link { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 
 // template<typename T>
index ba4c48d7dcc649c3d0c3fa94b6eb93e8843b71e6..3da0c962888a67adf1889337d5caee5aedd0de5c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do run { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // TODO: ICE on gimplify 16?
 
index 4bb5bc71462c9c0c67b478d4b86d1a53445d22fd..2f7aafc8b6bd844af647784a558f89904c6b3d9a 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C1()
index 676468112843ced0d703fbd3bd6d3778c7fff2cf..a2d340dfaca58699f1bcdd4f96009fce3bccbfec 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C()
index d1b4c0c59f3147717f576dfb1bada2a488d6bcf2..4908d11d56d85ed3b9a3e0dde438a5f5aed62144 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool Tuple() { // { dg-error "multiple statements" }
index 899988c37a368e0c0606bc08c50df016143a61f7..28765054b5ce12ce343a7cbbb85bced7fb165aa0 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept auto C1() { return 0; } // { dg-error "16:concept .concept auto C1\\(\\). declared with a deduced return type" }
index ecb7f6b12f7d0d419c6cc26b78dc47cd86bada4d..88ed5a8e8b27428b7d4470e3bd77a3e1067e2e12 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/92746
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T> concept bool C3() { return true; }
 static_assert(noexcept(C3<int>()), "function concept should be treated as if noexcept(true) specified");
index f23c057ab6b494fe6d3778072f1b788afc4fda62..e22cbf70a46b197fe514d7c1d61f00a63f9a35c8 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C() { return __is_class(T); }
index 8d0a2e1d2028964d2bccb491c45c9f9ee4017567..83099de90a14c516b5b8360242b685944aeb821d 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Test that constraint satisfaction checks work even when
 // processing template declarations.
index 1c1280c9d1544c736fd44b5a3eecdf61eecd2704..e0ac36ff3ddaab0ff28e9155c7ecccb86d3a4133 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C() { return __is_class(T); }
index 07b8e3a89ba2e878af18c2e6fda169fea4ccbcd6..3e076f62ee8812cace04c07146905cfa4dff2e38 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index bbaac46c9ff91f57bbddaeace4a3f08c27d972bc..64186778f28135c21c5c865b4f6ca52839f866a3 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C() { return __is_class(T); }
index bf277135e791a5bfe91d98d45aefb71b03046e58..3decf4e38ee35ca0c995330f6dec338a2334b467 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Check shorthand notation.
 
index 031e87fdf233d243efd00f0f92e2b8626b3d2628..57c4cfbd016ed903757d9a8d6cfd5bb1cf275ef9 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Redefinition errors.
 
index 32df5a556c0f01aa7af2ea8c02ba540ed5779a9a..594270f5178d3474af17139509cb88ec20ab2f84 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool Class() { return __is_class(T); }
index 2f5e88b945c6962bb4fb537dc5f239cf1b09e91a..51edd2fc539d25918a5e1dd5eb4ffbcf0c3013e9 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index 816072d8d3ad6e1e7dd62e9149f37652c0c8c7f3..e4909eb50bff602ad5578f92064f86cce6a7d9a0 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C() { return __is_class(T); }
index 257608a57a7fb1db44c09fc9a0f1fe628a0d28e6..983b37092f8f0b0133a5f62e99ed69fd411c806e 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 #include <type_traits>
index b137791bbb6a68843f82fee88aa569dbbb34ca84..98c260c89b959e3b1978d49f5bf8e485b9c8ada7 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C = __is_class(T);
index 6b7a7a439109aa5df607175636c9767e81ce4df3..76308ffb2120078243b11f200e1d7b0f561e96a0 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C() { return __is_class(T); }
index 5f9bb7e08f0e34bb865843d5c12aea3d938c1c7c..0dd9b646a4dbbd0a94cceb9ce334f817a733357d 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C = __is_class(T);
index 206777d1b94533d71afb71894b323f9d73cb07d4..5c6906c8d352f3a7a952255806bc261a42067d1c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index f02f1bea2473bd872d68176c63803919edb6a602..c92338e548dc2888c31e3ee6888f825088fca252 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename ... T>
   concept bool C1 = true;
index 0b275e14bf2cfc04674bc12c4e008be34c10b8ef..5ddd162893469b3f60354f68b5c12ad76f3bded7 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename ... T>
   concept bool C1 = true;
index bbfef7bed9ee4ddd9d69b861cbd43cebaf560d5c..cb1c5da789400b9f1b1b8459bc91b85d6b0d0101 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T, typename U = int>
   concept bool C()
index 233c5bcec7be3d76f4b416f2453a6f1de8c1e01d..b718d134b2b4f26ebd2e23e6706ad646cf76e46b 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/67003
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 namespace X {
   template<class>
index 343fe7a9824a1a5c127de5b32769a6a9ebec17b4..0c452a77b868b3168580bfc611af3c1b2c98c2e6 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66985
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <template <class> class T>
 concept bool Valid = requires { typename T<int>; };
index fbad42f69524ceed1b49a1b4716cb494e470e8d3..ea227433d2dfcf61f9aabf59697e654d60d903a4 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 struct S
 {
index 6b66b78fb8b743023201bf7c70da9b131c1db9fe..09c9d4fe8efac6ced6901faf15e9e5d0f9a1f8e5 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool Type = true;
index 2c14576f374cd9ae8cd76603bddacc86ce44891a..089f40fe640dffefa9927157491b81ab4ad1c76a 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Make sure that we check partial concept ids
 // with variable concepts.
index bec6715ea65456e635cecbc51d3c03d49273fcbf..954c072ee6ce1f1ac98bfc4908c2dc3499c656d7 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/67138
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T>
 concept bool _Auto = true;
index 0c6f91abcafcf232073e18715a0b6681be0c80c3..f1c3b9c6917ae0a46400ccd8ca7e5cc7f000bb9a 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C1 = sizeof(T) == 0;
index d90e5cfb02f6e92557c08ae67a7a2ba5e08098ba..6b79ef6401d7d7024a32800105af6ff76c455ead 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66218
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T, class U>
 concept bool Same = __is_same_as(T, U);
index ab9d8e632af2a7e6c4b7551077ab8f463aede82b..16451611b2c84c9e8a20a2dacb207e1e6ca61b60 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66218
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T, class U>
 concept bool Same = __is_same_as(T, U);
index 3f29c9339739e062c311df85cec4e9219902f7e4..21a6b318ff64d2cee12d1a1ae1eeea2711c63401 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T, class U>
 concept bool Same = __is_same_as(T, U);
index 20b9c9316489092e91ec05ef38d46a1c49a66cf1..c7f62d1aa4c961c7a026e21e1e8e5848fbe380f1 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <int I> struct B { static const int i = I; };
 template <int I> concept bool Few = I < 10;
index 5fcb38a5bf47717ca8b95bae5ece4f4eebb48e28..650d10eba5fac7dd2a1843581910dec3f1be25aa 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C1() {
index f927c9abefca7d876e447d3e924085c16f19af56..69091dcfdb75f17a8897e90825bb380a97477b85 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 using TD = int;
 
index 67153d63dfbcaf53f925ef39efc7f36f36b07ec6..cf34911e787c2e19d61014046120baa7d1030f74 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C = requires (T t) { t.mf(); };
index ea3077d84fba52d69a2648e985f94a8d27d7b478..76e6f6faefc710ff8066e57ab7be450c4ee770d2 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Performance test... This should be fast.
 
index 382eba110a6d94b7a867161728302ad88df14e00..75f0ea0e4eaccc66729619aad6a3f28f399acb75 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<class T> concept bool C1 = true;
 template<class A, class B> struct Pair {};
index 37adf931fb5d33a7cea7b048d3571c8f4a61fbdd..33122d2ddb0ad1eb7c112fbec09ca15862e6b486 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class X> concept bool allocatable = requires{{new X}->X *; };
 template <class X> concept bool semiregular = allocatable<X>;
index 16868ba042c058845286adb459c760502b063344..ff6a89807001c3206b2ac718f13b6a5736a7a3f9 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class>
 concept bool C1 () {
index 224eaa3d2f7a03616ed15c002d87183f102ddd66..e76aec15809c8a49dc516245ff22106831d11ddd 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<template<typename> class T>
 concept bool C = T<int>::value;
index a150e37d78d8e92091bee6e1351e1de2910effa0..351a6465df12e16e37137aa36fc0ff1b0a3b289c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C() { return true; }
index 675d66d9d7567d8fc6f442f033a46d13cbfecc3a..8da43aff49ccaded5520d95b97a8ccde192f9422 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<template<typename> class T>
 concept bool C = true;
index fb754253612eddf13d2cd5f9b9a830de27cda3d0..66ca52bdfe16e753b876933bad8410b98f9e8937 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<class T>
 concept bool Addable(){
index 52a42647948ac1f4dba4f293d711280a0ae4ce86..72f2aca89157a50e72146e5e4c7d4f09d448c261 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<int> concept bool C = true;
 
index 257e7c691db57574aff75b957dfd24768ff04e15..b376a490298ccf9823b25e9d5c13c93d24b415f1 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool NameProvider()
index cb3e2c6b55af66024a0fbf36dba1fbdda5ee4697..81d08180a29dce31bf6c3447bc1a07edba360457 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 // Conceptized version of template/ttp23.C
 
 template <class T> concept bool Foo = true;
index d708fd06f018fd1b947164776cf79f827d87de07..dc6983a6eaa45181a98415f00125283852d57169 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C1 = __is_same_as(T, int);
index 028149c13dce3bd3b6ca05d36f0559aac06ebe97..2e6bd2c04e08fc895a8b47b2b7f6f64273ca9cc9 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C1 = __is_same_as(T, int);
index d93dbc7f2dc534a45b501292bfa0c42c1c92decc..8f8ad6315bab9ba0f6ee8600173900cba17cdf51 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C1 = __is_same_as(T, int);
index d701859d1273bc53713389a8c37ff32ad42d2b9a..019a9333ecebb3b94a5ad70da8a68dac3b2a0295 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66937
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <tuple>
 
index 21a4915551b8b3d060527fff408f37250f874874..3a3b3405bfff663fb679c5855a74d36ff44c9f76 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C1 = __is_class(T);
index 5e1faec213f94a5f59af2ed7696bb85f6bcada96..0ef2322cad2db52a8cb0e1f3f5fa09da95df7309 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C1 = __is_class(T);
index 144c0ea1a24c07a96221b25b84e2d5676fb5c0bb..6fd96a5042e27d8f38f125bfbbcf3946eb7780d5 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T>
   concept bool C1 = __is_class(T);
index a7839ee5f85cc2435cab1df743fce0289ff5056e..7ae9f36c2d03136578e278ad5aafeea9ac0fe407 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T, typename U>
 concept bool Same = __is_same_as(T, U);
index d8fa2984f15c2043eaec958566d065bdaf2f2ffc..cc7f4af47c602a8ca68cc6f1b3459087b2965e1b 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename T1, typename T2>
 concept bool C1 = true;
index 80984a7ab1ec988e2019ddb5de3dd92d937c5e8e..d2270df172799405e9dbe157551d2fcce63f3f9e 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T>
 concept int C = true;          // { dg-error "bool" }
index 2cfe2666e16b400fde2c4329febbd07ac0626931..026fe9f416561f62d02fad5bd930c251633bb189 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/85133
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename> concept bool C; // { dg-error "no initializer" }
 
index 1b8890a789b331399d53de3cef8a4c35c7b77ad1..2eb419aa945e0479071f6e2c685cf0c0bb52c133 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/67139
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T>
 constexpr typename T::type::value_type _v = T::type::value;
index cc5ee5fa8e65040848584f5eb9e833080780ed5b..662511eee03e13262489b1667f298a793b664be1 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/68666
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 struct A {
   template <class>
index c3bc7f61513066ea6e93687bbe5703977213853b..c590f28ee8157cd7b35ccd03429cbb59ea3f0db2 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66712
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T, class...Args>
 concept bool _Constructible_ =
index 7b220097f9806fff52fdb1b389cf9f6c2161de5d..1776b951113e6b092721d58e3ac810bf752f5e25 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T> concept bool Copyable = requires (T t) { T(t); };
 template <class T> concept bool Constructable = requires { T(); };
index bd2f381a1a88ad18b86666092ab8332702c4c2c2..07c2401a785c964597d41134215f54896162b6de 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/70036
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template <class T> concept bool C = true;
 
index d6eea49b95894e93a75c3b2b2d37e323502f8680..1dfa2e6000b0ee4e3f052e04191cf0e8404a4a8b 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/73456
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 template<typename...> struct list {};
 
index 3ab7c9b6082b45d7e8a778048111961d93fa0fe7..bec97e983522891fa12e4c1b00b5af8f4588fdea 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/65575
 // { dg-do compile { target c++17_only } }
-// { dg-additional-options "-fconcepts" }
+// { dg-additional-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C = false;
index ea51e31817e2afee2bc83d1391bd18051da5fef6..cd3acf77876b0da4e08ca0b315e141a26f4975f9 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/66091
 // { dg-do compile { target c++17_only } }
-// { dg-additional-options "-fconcepts" }
+// { dg-additional-options "-fconcepts-ts" }
 
 template<typename T>
 concept bool C1()
index 75f8e40ca585e1249b6d8692836490b2e0f6c59b..726c90f4ab8a751ed410648ae5c7f6b35dab654b 100644 (file)
@@ -4,10 +4,9 @@
 template <typename T>
 void foo1(T& t) {
   typename T::template C<void> tcv = t;
-  typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+  typename T::template C<auto> u = tcv; // { dg-error "" }
   T::template C<auto>::f (tcv, u); // { dg-error "" }
   (typename T::template D<auto> (t)); // { dg-error "" }
-// { dg-warning "only available" "" { target c++17_down } .-1 }
 }
 
 struct T1 {
@@ -23,7 +22,7 @@ struct T1 {
 template <typename T>
 void foo2(T& t) {
   typename T::template C<void> tcv = t;
-  typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+  typename T::template C<auto> u = tcv; // { dg-error "" }
   T::template C<auto>::f (tcv, u); // { dg-error "" }
   T::template D<auto> (t); // { dg-error "" }
 }
index 1c1a41c0fa20dad4713ef993d4fd9dbbfaf7ac67..ec8ae3564fa982a5f0e4fda0c84d8ccff458411c 100644 (file)
@@ -8,10 +8,9 @@
 template <typename T>
 void foo1(T& t) {
   typename T::template C<void> tcv = t;
-  typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+  typename T::template C<auto> u = tcv; // { dg-error "" }
   T::template C<auto>::f (tcv, u); // { dg-error "" }
   (typename T::template D<auto> (t)); // { dg-error "" }
-// { dg-warning "only available" "" { target c++17_down } .-1 }
 }
 
 struct T1 {
@@ -27,7 +26,7 @@ struct T1 {
 template <typename T>
 void foo2(T& t) {
   typename T::template C<void> tcv = t;
-  typename T::template C<auto> u = tcv; // { dg-error "" "" { target c++20 } }
+  typename T::template C<auto> u = tcv; // { dg-error "" }
   T::template C<auto>::f (tcv, u); // { dg-error "" }
   T::template D<auto> (t); // { dg-error "" }
 }
index 1703de05f07a9aa18cbade41f671127664b47cd8..635a168899949d2b237df5e62cf48db03fbf61da 100644 (file)
@@ -1,4 +1,4 @@
 // { dg-do compile { target c++17_only } }
-// { dg-additional-options "-fconcepts" }
+// { dg-additional-options "-fconcepts-ts" }
 
 template<T> concept bool C = true;  // { dg-error "has not been declared" }
index 96aac69ed6a0f9de9f043dbc8aa1ec52036b2ed2..d351b4594aeac7bf9c9f26fabb10dbf12b0dde69 100644 (file)
@@ -1,6 +1,6 @@
 // PR c++/85265
 // { dg-do compile { target c++17_only } }
-// { dg-additional-options "-fconcepts" }
+// { dg-additional-options "-fconcepts-ts" }
 
 template<typename> concept bool C = true;