diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2009-11-27 16:36:43 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2009-11-27 16:36:43 +0000 |
commit | c7f06e130978925eec2f188d7d2f3ec9b378e8ac (patch) | |
tree | fcb330ca33d0591916605a642b33cd8e26d47be4 /gcc | |
parent | b0d49a6e80c68e623c8930006f2d4536e658ed47 (diff) | |
download | gcc-c7f06e130978925eec2f188d7d2f3ec9b378e8ac.zip gcc-c7f06e130978925eec2f188d7d2f3ec9b378e8ac.tar.gz gcc-c7f06e130978925eec2f188d7d2f3ec9b378e8ac.tar.bz2 |
re PR c++/38656 (Broken diagnostic: 'template_id_expr' not supported by pp_c_expression)
cp/
2009-11-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38656
* cxx-pretty-print.c (pp_cxx_expression): Handle TEMPLATE_ID_EXPR.
testsuite/
2009-11-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/38656
* g++.dg/cpp0x/error2.C: New.
From-SVN: r154712
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/cxx-pretty-print.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/error2.C | 9 |
4 files changed, 23 insertions, 0 deletions
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 <paolo.carlini@oracle.com> + PR c++/38656 + * cxx-pretty-print.c (pp_cxx_expression): Handle TEMPLATE_ID_EXPR. + +2009-11-27 Paolo Carlini <paolo.carlini@oracle.com> + 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 <paolo.carlini@oracle.com> + + PR c++/38656 + * g++.dg/cpp0x/error2.C: New. + 2009-11-27 Michael Matz <matz@suse.de> 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> int foo(); + +template<typename F> void bar(F f) +{ + f((foo<0>()=0)...); // { dg-error "pattern '\\(foo\\<0\\>\\)\\(\\)=0'" } +} |