[llvm-bugs] [Bug 36062] New: -Wfloat-equal not always recognized
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Jan 23 08:55:45 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36062
Bug ID: 36062
Summary: -Wfloat-equal not always recognized
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: ag at arvid.io
CC: llvm-bugs at lists.llvm.org
The following is not issuing the '-Wfloat-equal' warning: `(x + y) != 0.0f`. If
`0.0f` is changed into `0`, it's issued.
This seems to be somewhat related to
https://bugs.llvm.org/show_bug.cgi?id=23717.
While I agree with the rationale presented in the previously linked ticket,
comparing to zero after an operation is still potentially unsafe.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180123/9a6bf624/attachment-0001.html>
More information about the llvm-bugs
mailing list