PR 23572 warnings for out of range floating-point constants
Richard Henderson
rth@redhat.com
Tue Mar 20 20:00:00 GMT 2007
On Wed, Mar 14, 2007 at 06:13:38PM +0000, Manuel López-Ibáñez wrote:
> + /* We also give a warning if the value underflows. */
> + if (REAL_VALUES_IDENTICAL (real, dconst0)
> + && !REAL_VALUES_IDENTICAL (realvoidmode, dconst0))
> + warning (OPT_Woverflow, "floating constant exceeds range of %qT", type);
"exceeds" is misleading here.
Also, I think you should be changing the real.c routines a bit here,
as 1e-1000000000 won't be detected, since that underflows inside the
string parser.
r~
More information about the Gcc-patches
mailing list