[clang] [CLANG] Add warning when INF or NAN are used in a binary operation or as function argument in fast math mode. (PR #76873)
Zahira Ammarguellat via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 11 14:35:38 PST 2024
================
@@ -6771,6 +6771,11 @@ def warn_pointer_sub_null_ptr : Warning<
def warn_floatingpoint_eq : Warning<
"comparing floating point with == or != is unsafe">,
InGroup<DiagGroup<"float-equal">>, DefaultIgnore;
+def warn_fast_floatingpoint_eq : Warning<
+ "use of %select{infinity|NaN}0 will always be 'false' because "
----------------
zahiraam wrote:
Yea! not happy with this either.
May be saying something like this to warn the user the existence of inf/nan use: "use of inf/nan when the program will not be producing inf/nan according to the currently enabled floating-point options"?
https://github.com/llvm/llvm-project/pull/76873
More information about the cfe-commits
mailing list