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 32b929e..9e0494b 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 fd59de4..9523f73 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 c6323a5..2b29db8 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 e053306..abf7886 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 27a6afa..868a56c 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 8bf3fa9..6c98455 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 3359700..7f427d0 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 ac9d7e8..5f8ece9 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 f2345b1..a1c5e16 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 b9a5444..fb48567 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 6a461a5..96038fd 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 eba5771..d510fe0 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 29c78c4..207c36c 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 05c9152..c22a782 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 640c2b5..a5d0c18 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 dff719b..48a2664 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do link { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 
 // template<typename T>
index ba4c48d..3da0c96 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 4bb5bc7..2f7aafc 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 6764681..a2d340d 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 d1b4c0c..4908d11 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 899988c..2876505 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 ecb7f6b..88ed5a8 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 f23c057..e22cbf7 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 8d0a2e1..83099de 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 1c1280c..e0ac36f 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 07b8e3a..3e076f6 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index bbaac46..6418677 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 bf27713..3decf4e 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Check shorthand notation.
 
index 031e87f..57c4cfb 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 // Redefinition errors.
 
index 32df5a5..594270f 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 2f5e88b..51edd2f 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index 816072d..e4909eb 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 257608a..983b370 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 b137791..98c260c 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 6b7a7a4..76308ff 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 5f9bb7e..0dd9b64 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 206777d..5c6906c 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 #include <cassert>
 
index f02f1be..c92338e 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 0b275e1..5ddd162 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 bbfef7b..cb1c5da 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 233c5bc..b718d13 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 343fe7a..0c452a7 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 fbad42f..ea22743 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 struct S
 {
index 6b66b78..09c9d4f 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 2c14576..089f40f 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 bec6715..954c072 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 0c6f91a..f1c3b9c 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 d90e5cf..6b79ef6 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 ab9d8e6..1645161 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 3f29c93..21a6b31 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 20b9c93..c7f62d1 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 5fcb38a..650d10e 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 f927c9a..69091dc 100644 (file)
@@ -1,5 +1,5 @@
 // { dg-do compile { target c++17_only } }
-// { dg-options "-fconcepts" }
+// { dg-options "-fconcepts-ts" }
 
 using TD = int;
 
index 67153d6..cf34911 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 ea3077d..76e6f6f 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 382eba1..75f0ea0 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 37adf93..33122d2 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 16868ba..ff6a898 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 224eaa3..e76aec1 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 a150e37..351a646 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 675d66d..8da43af 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 fb75425..66ca52b 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 52a4264..72f2aca 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 257e7c6..b376a49 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 cb3e2c6..81d0818 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 d708fd0..dc6983a 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 028149c..2e6bd2c 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 d93dbc7..8f8ad63 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 d701859..019a933 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 21a4915..3a3b340 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 5e1faec..0ef2322 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 144c0ea..6fd96a5 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 a7839ee..7ae9f36 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 d8fa298..cc7f4af 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 80984a7..d2270df 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 2cfe266..026fe9f 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 1b8890a..2eb419a 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 cc5ee5f..662511e 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 c3bc7f6..c590f28 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 7b22009..1776b95 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 bd2f381..07c2401 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 d6eea49..1dfa2e6 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 3ab7c9b..bec97e9 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 ea51e31..cd3acf7 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 75f8e40..726c90f 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 1c1a41c..ec8ae35 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 1703de0..635a168 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 96aac69..d351b45 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;