[LLVMbugs] [Bug 13330] New: "Comparing floating point with == or != is unsafe” warning shouldn 't trigger for comparisons against +/- inf
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Jul 11 09:55:58 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=13330
Bug #: 13330
Summary: "Comparing floating point with == or != is unsafe”
warning shouldn't trigger for comparisons against +/-
inf
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: clattner at apple.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The "Comparing floating point with == or != is unsafe" warning is a great
warning, but it triggers in some cases that don't make sense, and *are*
reasonable to use exact comparisons for, for example, detection of inf and
-inf. See this thread on stack overflow for example:
http://stackoverflow.com/questions/11421756/weverything-yielding-comparing-floating-point-with-or-is-unsafe
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list