This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Updating fixed-point support for new C constant expression handling
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: gcc at gcc dot gnu dot org
- Cc: joseph at codesourcery dot com
- Date: Tue, 30 Jun 2009 19:31:08 +0100
- Subject: Updating fixed-point support for new C constant expression handling
The 4.5 C constant expressions patch:
http://gcc.gnu.org/ml/gcc-patches/2008-10/msg01061.html
stopped us from emitting the warnings expected by gcc.dg/fixed-point/addsub.c.
We used to handle the warnings in parser_build_binary_op, but now that
fixed-point constant folding is delayed until c_fully_fold, we no longer
know at that stage whether overflow has taken place.
What's the correct fix here? Should build_binary_op treat fixed-point
constants like integer constants? Should c_fully_fold emit warnings in
some cases? Should we just drop the warnings? Or something else?
Richard