[Bug fortran/54298] Add warning when doing equal/nonequal floating-point comparisons
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 17 16:24:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54298
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-08-17 16:24:44 UTC ---
(In reply to comment #1)
> Sounds doable.
> I'll give it a shot.
Thanks. I think it can help to find some real-world issues, even if comparisons
such as "a == 0.0" are generally safe.
(In reply to comment #0)
> Suggested by ISO/IEC Project 22.24772 "Guidance for Avoiding Vulnerabilities
> through Language Selection and Use" (see links at
> http://gcc.gnu.org/wiki/GFortranStandards)
>
> From the Fortran appendix (draft at
Wrong link (that's the current 2nd-version draft of the TR, still the Fortran
part). The Fortran link is:
ftp://ftp.nag.co.uk/sc22wg5/N1901-N1950/N1929.pdf
The issue is also mentioned in "Fortran.58 Implications for Standardization"
under "Future standardization efforts should consider:"
"Requiring that processors have the ability to detect and report the occurrence
within a submitted program unit of tests for equality between two objects of
type real or complex."
More information about the Gcc-bugs
mailing list