This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ Patch, diagnostic] PR 33465
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Date: Fri, 30 Jan 2009 11:07:25 +0100
- Subject: [C++ Patch, diagnostic] PR 33465
Hi,
another pretty trivial patchlet. Tested x86_64-linux.
Ok for mainline?
Paolo.
////////////////
/cp
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33465
* error.c (dump_expr): Handle FIX_TRUNC_EXPR and FLOAT_EXPR.
/testsuite
2009-01-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/33465
* g++.dg/parse/error34.C: New.
* g++.dg/parse/error35.C: Likewise.
Index: testsuite/g++.dg/parse/error34.C
===================================================================
*** testsuite/g++.dg/parse/error34.C (revision 0)
--- testsuite/g++.dg/parse/error34.C (revision 0)
***************
*** 0 ****
--- 1,8 ----
+ // PR c++/33465
+
+ int foo(int);
+
+ void bar(double d)
+ {
+ foo(d)(); // { dg-error "foo\\(\\(int\\)d\\)" }
+ }
Index: testsuite/g++.dg/parse/error35.C
===================================================================
*** testsuite/g++.dg/parse/error35.C (revision 0)
--- testsuite/g++.dg/parse/error35.C (revision 0)
***************
*** 0 ****
--- 1,8 ----
+ // PR c++/33465
+
+ int foo(double);
+
+ void bar(int i)
+ {
+ foo(i)(); // { dg-error "foo\\(\\(double\\)i\\)" }
+ }
Index: cp/error.c
===================================================================
*** cp/error.c (revision 143760)
--- cp/error.c (working copy)
*************** dump_expr (tree t, int flags)
*** 2073,2078 ****
--- 2075,2082 ----
case LTGT_EXPR:
case COMPLEX_EXPR:
case BIT_FIELD_REF:
+ case FIX_TRUNC_EXPR:
+ case FLOAT_EXPR:
pp_expression (cxx_pp, t);
break;