aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2014-04-01 17:25:42 -0400
committerJason Merrill <jason@gcc.gnu.org>2014-04-01 17:25:42 -0400
commit52710d27d17c1aad66c5acfc6bae9ced736c0cad (patch)
treedb745d01831f0f204b8701b44edaadb254860e94
parentcd8a9d6d1c66d77e3d6a82468b5ea4794de3ffca (diff)
downloadgcc-52710d27d17c1aad66c5acfc6bae9ced736c0cad.zip
gcc-52710d27d17c1aad66c5acfc6bae9ced736c0cad.tar.gz
gcc-52710d27d17c1aad66c5acfc6bae9ced736c0cad.tar.bz2
pt.c (process_partial_specialization): Say "not deducible" rather than "not used".
* pt.c (process_partial_specialization): Say "not deducible" rather than "not used". Use inform. From-SVN: r209000
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/pt.c8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31439.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-33964.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash97.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash98.C2
-rw-r--r--gcc/testsuite/g++.dg/template/partial5.C4
7 files changed, 14 insertions, 9 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 764400c..6c9a31d 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 9de00d5..7f4ef8b 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -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)
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31439.C b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
index f753735..df50e41 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31439.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
@@ -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" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
index 9e40737..8cbc0d6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
@@ -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;
};
diff --git a/gcc/testsuite/g++.dg/template/crash97.C b/gcc/testsuite/g++.dg/template/crash97.C
index 3d177f4..7d2161f5 100644
--- a/gcc/testsuite/g++.dg/template/crash97.C
+++ b/gcc/testsuite/g++.dg/template/crash97.C
@@ -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();
};
diff --git a/gcc/testsuite/g++.dg/template/crash98.C b/gcc/testsuite/g++.dg/template/crash98.C
index a79ab02..9d7d2ec 100644
--- a/gcc/testsuite/g++.dg/template/crash98.C
+++ b/gcc/testsuite/g++.dg/template/crash98.C
@@ -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 ();
diff --git a/gcc/testsuite/g++.dg/template/partial5.C b/gcc/testsuite/g++.dg/template/partial5.C
index aa32e3b..979e4c6 100644
--- a/gcc/testsuite/g++.dg/template/partial5.C
+++ b/gcc/testsuite/g++.dg/template/partial5.C
@@ -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>