From 0a8fc2475a662ae69dbc0e8d964fe9489a595fde Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Tue, 28 Aug 2007 16:41:56 +0000 Subject: [PATCH] re PR c++/33209 (Broken diagnostic: 'template_type_parm' not supported by dump_expr) /cp 2007-08-28 Paolo Carlini PR c++/33209 * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and BOUND_TEMPLATE_TEMPLATE_PARM. /testsuite 2007-08-28 Paolo Carlini PR c++/33209 * g++.dg/template/error29.C: New. From-SVN: r127866 --- gcc/cp/ChangeLog | 6 ++++++ gcc/cp/error.c | 5 +++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/template/error29.C | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 gcc/testsuite/g++.dg/template/error29.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f612c9cb9d6..c6b2aaf8265 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2007-08-28 Paolo Carlini + + PR c++/33209 + * error.c (dump_expr): Deal with TEMPLATE_TYPE_PARM and + BOUND_TEMPLATE_TEMPLATE_PARM. + 2007-08-28 Jakub Jelinek PR c++/32596 diff --git a/gcc/cp/error.c b/gcc/cp/error.c index 90b95c08cac..d6675f0102e 100644 --- a/gcc/cp/error.c +++ b/gcc/cp/error.c @@ -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. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0bbe27a9bef..6254d202c49 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-08-28 Paolo Carlini + + PR c++/33209 + * g++.dg/template/error29.C: New. + 2007-08-28 Jakub Jelinek 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 index 00000000000..2e2291d7e87 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/error29.C @@ -0,0 +1,5 @@ +// PR c++/33209 + +template void foo(int, T::x); // { dg-error "T::x" } + +template class T> void foo2(int, T::x); // { dg-error "T::x" } -- 2.30.2