This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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;
  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]