]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/51230 (Broken diagnostic: 'template_parm_index' not supported by dump_type)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 20 Nov 2011 22:37:54 +0000 (22:37 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 20 Nov 2011 22:37:54 +0000 (22:37 +0000)
/cp
2011-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/51230
* pt.c (unify_inconsistency): Handle non-type parameters better.
* error.c (dump_expr): Handle TEMPLATE_TEMPLATE_PARM.

/cp
2011-11-20  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/51230
* g++.dg/template/error46.C: New.

From-SVN: r181538

gcc/cp/ChangeLog
gcc/cp/error.c
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/error46.C [new file with mode: 0644]

index 96e4d20a1d71f6f17687ecf2c5d4ba44ae175924..1bc0e5a05ab5c7416c87a5615bcd70fc1f501716 100644 (file)
@@ -1,3 +1,9 @@
+2011-11-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/51230
+       * pt.c (unify_inconsistency): Handle non-type parameters better.
+       * error.c (dump_expr): Handle TEMPLATE_TEMPLATE_PARM.
+
 2011-11-20  Dodji Seketeli  <dodji@redhat.com>
 
        PR c++/51194
index 602cb75236a14922da4670604598aa25772311be..4940a783353c72dbf12a8b3cc150cf45b8fb2948 100644 (file)
@@ -2406,6 +2406,7 @@ dump_expr (tree t, int flags)
       break;
 
     case TEMPLATE_TYPE_PARM:
+    case TEMPLATE_TEMPLATE_PARM:
     case BOUND_TEMPLATE_TEMPLATE_PARM:
       dump_type (t, flags);
       break;
index 2b02fa4269d7f4f29f016eb65a359a34f8a39eb3..f4eb1d4852afe49768d235908f16e64231a02595 100644 (file)
@@ -5501,7 +5501,7 @@ unify_inconsistency (bool explain_p, tree parm, tree first, tree second)
 {
   if (explain_p)
     inform (input_location,
-           "  deduced conflicting types for parameter %qT (%qT and %qT)",
+           "  conflicting deductions for parameter %qE (%qE and %qE)",
            parm, first, second);
   return 1;
 }
index 2a9c6d101db661f54e242493951a5e52410f216b..8b2f661ec77b451ffb106edc1386fd946ea696aa 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-20  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/51230
+       * g++.dg/template/error46.C: New.
+
 2011-11-20  Uros Bizjak  <ubizjak@gmail.com>
 
        PR target/51235
diff --git a/gcc/testsuite/g++.dg/template/error46.C b/gcc/testsuite/g++.dg/template/error46.C
new file mode 100644 (file)
index 0000000..0f4bdaf
--- /dev/null
@@ -0,0 +1,11 @@
+// PR c++/51230
+
+template<int> struct A {}; 
+
+template<int N> void foo(A<N>, A<N>); // { dg-message "template" }
+
+void bar()
+{
+  foo(A<0>(), A<1>()); // { dg-error "no matching" }
+}
+// { dg-message "candidate|parameter 'N' ('0' and '1')" { target *-*-* } 9 }