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 Sun, 21 Jan 2007, Manuel López-Ibáñez wrote:
> Fisrt, independently of whether we warn with -Wconversion or not, you
> said that this shouldn't be a pedwarn. Should I remove the pedwarn
> then?
I said that the warning for underflow should not be a pedwarn, and that
it's unclear if the warning for overflow should be one either if
infinities are supported (probably it should only be a pedwarn if they
aren't, so my 2004-10-08 patch was wrong in that regard).
> Second, it was not my intention to warn for 0.1 being inexact. This
> patch doesn't warn for that. It warns when the only representation of
> some constant value (without any conversion involved) is either +/-
> infinite or 0, because the value is so high or so small that cannot be
> represented any other way. That is what I understood that the user
> wishes to be warned for (PR23572). If you still think that that
> doesn't deserve a warning (be it in Woverflow, Wconversion or
> something else), then I will close that PR as WONTFIX.
I think the warning for underflow is useful (and maybe should be on by
default), but doesn't fit any of the existing warning options.
--
Joseph S. Myers
joseph@codesourcery.com