This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 23572 warnings for out of range floating-point constants
On 20/03/07, Richard Henderson <rth@redhat.com> wrote:
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.
ex·ceed
1. To extend beyond or outside of: The river exceeded its banks.
2. To be greater than; surpass: "a horror of the spirit that cannot be
exceeded at the hour of birth or death" Robert Louis Stevenson.
3. To go beyond the limits of: exceeded my allowance. See Synonyms at excel.
I think 1 and 3 correspond to the intended meaning here but if you
have a better suggestion... I am not a native speaker.
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.
Are you suggesting that we emit a warning from the string parser? Do
we do this for any other cases? I can give it a try.
Any suggestions about my concerns regarding the testcases (testing for
infinity support)?
Thanks,
Manuel.