[Bug c++/105278] no warning for precise literals compared with floats

2022-11-16 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278 --- Comment #5 from Andrew Pinski --- 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

[Bug c++/105278] no warning for precise literals compared with floats

2022-04-14 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278 --- Comment #4 from David Binderman --- (In reply to Eric Gallager from comment #3) > (In reply to David Binderman from comment #2) > > (In reply to Eric Gallager from comment #1) > > > -Wfloat-equal gets you a warning, as does -Wdouble-promotio

[Bug c++/105278] no warning for precise literals compared with floats

2022-04-14 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278 --- Comment #3 from Eric Gallager --- (In reply to David Binderman from comment #2) > (In reply to Eric Gallager from comment #1) > > -Wfloat-equal gets you a warning, as does -Wdouble-promotion: > > Thanks for that. This looks like another cas

[Bug c++/105278] no warning for precise literals compared with floats

2022-04-14 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278 --- Comment #2 from David Binderman --- (In reply to Eric Gallager from comment #1) > -Wfloat-equal gets you a warning, as does -Wdouble-promotion: Thanks for that. This looks like another case where an obscure flag really ought to be in -Wall

[Bug c++/105278] no warning for precise literals compared with floats

2022-04-14 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105278 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org