This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/54298] Add warning when doing equal/nonequal floating-point comparisons


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]