This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++, diagnostic] PR 35338
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>
- Cc: Gabriel Dos Reis <gdr at cs dot tamu dot edu>
- Date: Mon, 25 Feb 2008 18:08:13 +0100
- Subject: [C++, diagnostic] PR 35338
Hi all, hi Gaby,
a simple patch for a simple issue. Tested x86_64-linux.
I'd like to apply to mainline and 4_3-branch for 4.3.1.
Ok?
Thanks,
Paolo.
/////////////////////
/cp
2008-02-05 Paolo Carlini <pcarlini@suse.de>
PR c++/35338
* error.c (dump_type): Handle FIXED_POINT_TYPE.
(dump_expr): Handle FIXED_CST.
/testsuite
2008-02-05 Paolo Carlini <pcarlini@suse.de>
PR c++/35338
* g++.dg/other/error25.C: New.
Index: testsuite/g++.dg/other/error25.C
===================================================================
*** testsuite/g++.dg/other/error25.C (revision 0)
--- testsuite/g++.dg/other/error25.C (revision 0)
***************
*** 0 ****
--- 1,5 ----
+ // PR c++/35338
+ // { dg-options "" }
+
+ int i = 0r; // { dg-error "unnamed-fixed" }
+ bool b = !0r; // { dg-error "0.0|argument" }
Index: cp/error.c
===================================================================
*** cp/error.c (revision 132614)
--- cp/error.c (working copy)
*************** dump_type (tree t, int flags)
*** 326,331 ****
--- 326,332 ----
case BOOLEAN_TYPE:
case COMPLEX_TYPE:
case VECTOR_TYPE:
+ case FIXED_POINT_TYPE:
pp_type_specifier_seq (cxx_pp, t);
break;
*************** dump_expr (tree t, int flags)
*** 2045,2050 ****
--- 2046,2052 ----
case MODOP_EXPR:
case ABS_EXPR:
case VECTOR_CST:
+ case FIXED_CST:
pp_expression (cxx_pp, t);
break;