re PR c++/33210 (Broken diagnostics: 'bound_template_template_parm' not supported...
authorPaolo Carlini <pcarlini@suse.de>
Fri, 31 Aug 2007 11:38:45 +0000 (11:38 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Fri, 31 Aug 2007 11:38:45 +0000 (11:38 +0000)
/cp
2007-08-31  Paolo Carlini  <pcarlini@suse.de>

PR c++/33210
* cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
BOUND_TEMPLATE_TEMPLATE_PARM.

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

PR c++/33210
* g++.dg/template/error30.C: New.

From-SVN: r127987

gcc/cp/ChangeLog
gcc/cp/cxx-pretty-print.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/error30.C [new file with mode: 0644]

index eb814766436815f339fafb36f3b8b58d47df79c7..b79324f4358a165bec62ac676e870a51a81f499b 100644 (file)
@@ -1,3 +1,9 @@
+2007-08-31  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33210
+       * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with
+       BOUND_TEMPLATE_TEMPLATE_PARM.
+
 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/32113
index 158cbc4f0763d149c69e791539271a45620a21b8..4bdd19d57e6f5a76bf87600863359d8fb9b9f8b9 100644 (file)
@@ -190,6 +190,8 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
     case RECORD_TYPE:
     case UNION_TYPE:
     case ENUMERAL_TYPE:
+    case TYPENAME_TYPE:
+    case UNBOUND_CLASS_TEMPLATE:
       pp_cxx_unqualified_id (pp, TYPE_NAME (t));
       break;
 
@@ -205,9 +207,12 @@ pp_cxx_unqualified_id (cxx_pretty_printer *pp, tree t)
       pp_cxx_unqualified_id (pp, TEMPLATE_PARM_DECL (t));
       break;
 
-    case TYPENAME_TYPE:
-    case UNBOUND_CLASS_TEMPLATE:
-      pp_cxx_unqualified_id (pp, TYPE_NAME (t));
+    case BOUND_TEMPLATE_TEMPLATE_PARM:
+      pp_cxx_cv_qualifier_seq (pp, t);
+      pp_cxx_unqualified_id (pp, TYPE_IDENTIFIER (t));
+      pp_cxx_begin_template_argument_list (pp);
+      pp_cxx_template_argument_list (pp, TYPE_TI_ARGS (t));
+      pp_cxx_end_template_argument_list (pp);
       break;
 
     default:
index 134ea79cc4a40883cd4777bcce7e68218e097496..82d3f3a31e50e587be451c8c6935d0b66e55ecdf 100644 (file)
@@ -1,3 +1,8 @@
+2007-08-31  Paolo Carlini  <pcarlini@suse.de>
+
+       PR c++/33210
+       * g++.dg/template/error30.C: New.
+
 2007-08-31  Paolo Carlini  <pcarlini@suse.de>
 
        PR c++/32113
diff --git a/gcc/testsuite/g++.dg/template/error30.C b/gcc/testsuite/g++.dg/template/error30.C
new file mode 100644 (file)
index 0000000..e1138d0
--- /dev/null
@@ -0,0 +1,5 @@
+// PR c++/33210
+
+template<int> struct A;
+
+template<template<typename> class B> A<B<int>::x> operator() (); // { dg-error "A<B<int>::x>" }