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: [email protected]
Reporter: [email protected]
CC: [email protected]
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
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs