aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2007-08-31 11:38:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2007-08-31 11:38:45 +0000
commitc8c00613059c0c5de5517474b7bb390bf21c4201 (patch)
tree724045b3e965a5a1835e53dcf4eab274cfd99dc2
parent8a26ebb635739d370e7726ec8af5d119bb86efdf (diff)
downloadgcc-c8c00613059c0c5de5517474b7bb390bf21c4201.zip
gcc-c8c00613059c0c5de5517474b7bb390bf21c4201.tar.gz
gcc-c8c00613059c0c5de5517474b7bb390bf21c4201.tar.bz2
re PR c++/33210 (Broken diagnostics: 'bound_template_template_parm' not supported by pp_cxx_unqualified_id/dump_decl)
/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
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/cxx-pretty-print.c11
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/template/error30.C5
4 files changed, 24 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index eb81476..b79324f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,11 @@
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
* search.c (lookup_member): Check the name argument for
error_mark_node.
diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c
index 158cbc4..4bdd19d 100644
--- a/gcc/cp/cxx-pretty-print.c
+++ b/gcc/cp/cxx-pretty-print.c
@@ -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:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 134ea79..82d3f3a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,10 @@
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
* g++.dg/template/crash70.C: New.
diff --git a/gcc/testsuite/g++.dg/template/error30.C b/gcc/testsuite/g++.dg/template/error30.C
new file mode 100644
index 0000000..e1138d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error30.C
@@ -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>" }