[Bug fortran/54298] New: Add warning when doing equal/nonequal floating-point comparisons
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Aug 17 15:15:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54298
Bug #: 54298
Summary: Add warning when doing equal/nonequal floating-point
comparisons
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
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
http://grouper.ieee.org/groups/plv/DocLog/400-499/400-419/22-WG23-N-0410/n0410.pdf)
"Fortran.5 Floating-point Arithmetic [PFL]
...
"Fortran.5.2 Guidance to Fortran Users"
...
"* Do not create a logical value from a test for equality or inequality between
two floating-point expressions. Use compiler options where available to detect
such a usage"
gfortran doesn't have such a warning.
More information about the Gcc-bugs
mailing list