]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pt.c (process_partial_specialization): Say "not deducible" rather than "not used".
authorJason Merrill <jason@redhat.com>
Tue, 1 Apr 2014 21:25:42 +0000 (17:25 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 1 Apr 2014 21:25:42 +0000 (17:25 -0400)
* pt.c (process_partial_specialization): Say "not deducible"
rather than "not used".  Use inform.

From-SVN: r209000

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.dg/cpp0x/pr31439.C
gcc/testsuite/g++.dg/cpp0x/vt-33964.C
gcc/testsuite/g++.dg/template/crash97.C
gcc/testsuite/g++.dg/template/crash98.C
gcc/testsuite/g++.dg/template/partial5.C

index 764400c78554f9d30c40d9d475e3780f0fd230a6..6c9a31de93e304570f09b844e7bab0b1e8a80f9e 100644 (file)
@@ -1,5 +1,8 @@
 2014-04-01  Jason Merrill  <jason@redhat.com>
 
+       * pt.c (process_partial_specialization): Say "not deducible"
+       rather than "not used".  Use inform.
+
        PR c++/60374
        * pt.c (coerce_template_parms): Check that the pack expansion
        pattern works with the first matching parameter.
index 9de00d556e207de24a32e92dd6b63cfc6351b44f..7f4ef8b3519b902070c8f82dd5055fdac947a285 100644 (file)
@@ -4139,15 +4139,17 @@ process_partial_specialization (tree decl)
   for (i = 0; i < ntparms; ++i)
     if (tpd.parms[i] == 0)
       {
-       /* One of the template parms was not used in the
+       /* One of the template parms was not used in a deduced context in the
           specialization.  */
        if (!did_error_intro)
          {
-           error ("template parameters not used in partial specialization:");
+           error ("template parameters not deducible in "
+                  "partial specialization:");
            did_error_intro = true;
          }
 
-       error ("        %qD", TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
+       inform (input_location, "        %qD",
+               TREE_VALUE (TREE_VEC_ELT (inner_parms, i)));
       }
 
   if (did_error_intro)
index f75373555ce4fa15140f19c3b8795028a105776b..df50e41cdb5445ddf61b0afd364d691b739a90f7 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-do compile { target c++11 } }
 template<typename...> struct A;
 
-template<char> struct A<> {}; // { dg-error "not used in partial specialization|anonymous|declaration" }
+template<char> struct A<> {}; // { dg-error "not deducible|anonymous|declaration" }
 
 template<typename T, typename... U> struct A<T, U...> : A<U...> {}; // { dg-error "incomplete type" }
 
index 9e40737d5f0b8f00783cb757b9ec52025140b016..8cbc0d6478d642590fd07fd786a4db6951a24a31 100644 (file)
@@ -6,7 +6,7 @@ struct foo
 };
 
 template<typename ... Args>
-struct foo< typename Args::is_applied... > // { dg-error "not used|Args" }
+struct foo< typename Args::is_applied... > // { dg-error "not deducible|Args" }
 {
     static bool const value = false;
 };
index 3d177f4e53412ffb74bba5a706bd858028e4c1fa..7d2161f54f3e07c1c11ad7028cf9233313be8491 100644 (file)
@@ -2,7 +2,7 @@
 
 template<typename> struct A {};
 
-template<typename> struct A<int> // { dg-error "not used|template\\-parameter" }
+template<typename> struct A<int> // { dg-error "not deducible|template\\-parameter" }
 {
   template<int> void foo();
 };
index a79ab02f695f453ea01255cf54dba52fb438d6fc..9d7d2ece1458a7b22cf5652852bc11fc24e13431 100644 (file)
@@ -2,7 +2,7 @@
 
 template < typename > struct A;
 
-template < typename > struct A < int > // { dg-error "not used|template\\-parameter|declaration" }
+template < typename > struct A < int > // { dg-error "not deducible|template\\-parameter|declaration" }
 {
   int i;
   int f ();
index aa32e3b8a419cd5aa1bc982c7cd83edcab0c778e..979e4c62bf6b966e64615164c2cbff273b435bc2 100644 (file)
@@ -4,7 +4,7 @@ template<typename T>
 struct X { };
 
 template<typename T>
-struct X<typename T::foo> { }; // { dg-error "not used|T" }
+struct X<typename T::foo> { }; // { dg-error "not deducible|T" }
 
 template<int N>
 struct X<int[N]> {}; // okay
@@ -14,7 +14,7 @@ template<typename T, typename T::foo V>
 struct Y { };
 
 template<typename T, typename U, U v>
-struct Y<T, v> { }; // { dg-error "not used|U" }
+struct Y<T, v> { }; // { dg-error "not deducible|U" }
 
 
 template<typename T, T V>