re PR c++/33209 (Broken diagnostic: 'template_type_parm' not supported by dump_expr)
authorPaolo Carlini <pcarlini@suse.de>
Tue, 28 Aug 2007 16:41:56 +0000 (16:41 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Tue, 28 Aug 2007 16:41:56 +0000 (16:41 +0000)
/cp
2007-08-28  Paolo Carlini  <pcarlini@suse.de>

PR c++/33209
* error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
BOUND_TEMPLATE_TEMPLATE_PARM.

/testsuite
2007-08-28  Paolo Carlini  <pcarlini@suse.de>

PR c++/33209
* g++.dg/template/error29.C: New.

From-SVN: r127866

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

index f612c9cb9d6ad26219a37918997e55e1c5e51281..c6b2aaf82651c7e9c21d42005b599553baebfced 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-28  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33209
+       * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and
+       BOUND_TEMPLATE_TEMPLATE_PARM.
+
 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/32596
index 90b95c08cac7d7d2f4e17e5b35cf3ee729253169..d6675f0102e0ef00932751f445d6e891b2dbb186 100644 (file)
@@ -2049,6 +2049,11 @@ dump_expr (tree t, int flags)
       pp_id_expression (cxx_pp, t);
       break;
 
+    case TEMPLATE_TYPE_PARM:
+    case BOUND_TEMPLATE_TEMPLATE_PARM:
+      dump_type (t, flags);
+      break;
+
       /*  This list is incomplete, but should suffice for now.
          It is very important that `sorry' does not call
          `report_error_function'.  That could cause an infinite loop.  */
index 0bbe27a9befcb7da6f245945f707d1041d43dd0c..6254d202c4941c46f5c37f9bfd0b805ffe04618e 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-28  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33209
+       * g++.dg/template/error29.C: New.
+
 2007-08-28  Jakub Jelinek  <jakub@redhat.com>
 
        PR c++/32596
diff --git a/gcc/testsuite/g++.dg/template/error29.C b/gcc/testsuite/g++.dg/template/error29.C
new file mode 100644 (file)
index 0000000..2e2291d
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/33209
+
+template<typename T> void foo(int, T::x); // { dg-error "T::x" }
+
+template<template<typename> class T> void foo2(int, T<int>::x); // { dg-error "T<int>::x" }