From c7f06e130978925eec2f188d7d2f3ec9b378e8ac Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Fri, 27 Nov 2009 16:36:43 +0000 Subject: re PR c++/38656 (Broken diagnostic: 'template_id_expr' not supported by pp_c_expression) cp/ 2009-11-27 Paolo Carlini PR c++/38656 * cxx-pretty-print.c (pp_cxx_expression): Handle TEMPLATE_ID_EXPR. testsuite/ 2009-11-27 Paolo Carlini PR c++/38656 * g++.dg/cpp0x/error2.C: New. From-SVN: r154712 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/cxx-pretty-print.c | 4 ++++ gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/g++.dg/cpp0x/error2.C | 9 +++++++++ 4 files changed, 23 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp0x/error2.C (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 032afa0..e804913 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,10 @@ 2009-11-27 Paolo Carlini + PR c++/38656 + * cxx-pretty-print.c (pp_cxx_expression): Handle TEMPLATE_ID_EXPR. + +2009-11-27 Paolo Carlini + PR c++/35112 * pt.c (print_overloaded_functions): New. (print_candidates): Call the latter. diff --git a/gcc/cp/cxx-pretty-print.c b/gcc/cp/cxx-pretty-print.c index 4851af9..305b7ed 100644 --- a/gcc/cp/cxx-pretty-print.c +++ b/gcc/cp/cxx-pretty-print.c @@ -1092,6 +1092,10 @@ pp_cxx_expression (cxx_pretty_printer *pp, tree t) pp_cxx_ws_string (pp, "..."); break; + case TEMPLATE_ID_EXPR: + pp_cxx_template_id (pp, t); + break; + case NONTYPE_ARGUMENT_PACK: { tree args = ARGUMENT_PACK_ARGS (t); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d0532ff..80ad4c2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-11-27 Paolo Carlini + + PR c++/38656 + * g++.dg/cpp0x/error2.C: New. + 2009-11-27 Michael Matz PR rtl-optimization/42084 diff --git a/gcc/testsuite/g++.dg/cpp0x/error2.C b/gcc/testsuite/g++.dg/cpp0x/error2.C new file mode 100644 index 0000000..ca681eb --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/error2.C @@ -0,0 +1,9 @@ +// PR c++/38656 +// { dg-options "-std=c++0x" } + +template int foo(); + +template void bar(F f) +{ + f((foo<0>()=0)...); // { dg-error "pattern '\\(foo\\<0\\>\\)\\(\\)=0'" } +} -- cgit v1.1