[Bug c/19999] -Wfloat-equal does not warn for complex numbers
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 16 14:56:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-16 06:48 -------
Confirmed, it is easy to see where the problem is when we look at the source:
if (warn_float_equal && (code0 == REAL_TYPE || code1 == REAL_TYPE))
warning ("comparing floating point with == or != is unsafe");
We should not be using == REAL_TYPE but FLOAT_TYPE_P instead which also takes into account vectors
too (even though we don't define equality for vectors yet).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2005-02-16 06:48:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19999
More information about the Gcc-bugs
mailing list