================
@@ -2922,7 +2922,7 @@ static bool handleFloatFloatBinOp(EvalInfo &Info, const 
BinaryOperator *E,
   //   If during the evaluation of an expression, the result is not
   //   mathematically defined [...], the behavior is undefined.
   // FIXME: C++ rules require us to not conform to IEEE 754 here.
-  if (LHS.isNaN()) {
+  if (!Info.getLangOpts().CPlusPlus23 && LHS.isNaN()) {
----------------
cor3ntin wrote:

> My understanding of the intended design was that operations producing NaNs 
> from non-NaNs in C++

What is "operation" here? NaN in arithmetics / conversions / other core 
language etc are one thing, but
when calling a function which is specifically specified to produce NaN in some 
cases... it's very unclear to me that the program should be invalid.

If that's the intent, is there anywhere where it would be documented?


https://github.com/llvm/llvm-project/pull/88978
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to