[Bug c++/105278] no warning for precise literals compared with floats
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Nov 16 22:52:33 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note I think GCC's -Wfloat-equal is more reasonible than Clang's
-Wliteral-range really. The reason is because even if something can be
represented exactly in floating point (e.g. 3.0 or even 0.0), you could in
theory still get a few precision mismatch due to FMA or some other slight
differences in HW implementation.
More information about the Gcc-bugs
mailing list