From c8c00613059c0c5de5517474b7bb390bf21c4201 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 31 Aug 2007 11:38:45 +0000 Subject: [PATCH] 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 PR c++/33210 * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with BOUND_TEMPLATE_TEMPLATE_PARM. /testsuite 2007-08-31 Paolo Carlini PR c++/33210 * g++.dg/template/error30.C: New. From-SVN: r127987 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/cxx-pretty-print.c | 11 ++++++++--- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/error30.C | 5 +++++ 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 gcc/testsuite/g++.dg/template/error30.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index eb814766436..b79324f4358 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-31 Paolo Carlini + + PR c++/33210 + * cxx-pretty-print.c (pp_cxx_unqualified_id): Deal with + BOUND_TEMPLATE_TEMPLATE_PARM. + 2007-08-31 Paolo Carlini PR c++/32113 diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 158cbc4f076..4bdd19d57e6 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 134ea79cc4a..82d3f3a31e5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-31 Paolo Carlini + + PR c++/33210 + * g++.dg/template/error30.C: New. + 2007-08-31 Paolo Carlini 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 index 00000000000..e1138d052ec --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error30.C @@ -0,0 +1,5 @@ +// PR c++/33210 + +template struct A; + +template class B> A::x> operator() (); // { dg-error "A::x>" } -- 2.30.2