https://bugs.llvm.org/show_bug.cgi?id=49212
Bug ID: 49212
Summary: Clang should warn when std::isinf is compiled with
-ffast-math
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: bmo...@google.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
When -ffast-math is enabled, Clang can optimize away calls to std::isinf (and
similar functions such as std::isnan) in ways that may be surprising. As one
of my colleagues said, "I thought -ffast-math only affected stuff like
reordering operations in mathematically-but-not-numerically-equivalent ways and
wouldn't affect stuff like isinf or isnan."
Can we add a warning for the case where std::isinf and similar functions are
invoked in code compiled with -ffast-math?
This warning would also likely have made the confusing interaction of options
in bug 33510 immediately obvious, rather than requiring the user to notice that
their NaN handling wasn't working as expected.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs