https://bugs.llvm.org/show_bug.cgi?id=38331
Bug ID: 38331
Summary: -Wfloat-equal does not catch comparision with constant
value
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcough...@apple.com
Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org
Code compiled with -Wfloat-equal:
bool compare (const float lhs, const float rhs)
{
return lhs == rhs; // Clang warns
}
bool compare2 (const float lhs, const float rhs)
{
return lhs == 1.0; // No warning from Clang, GCC warns
}
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs