================ @@ -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()) { ---------------- hubert-reinterpretcast wrote:
My understanding of the intended design was that operations producing NaNs from non-NaNs in C++ constexpr cause the expression to not be constant. That said, NaNs are still in play because of `numeric_limits`. For `frexp` though, I think there being an "unspecified" value stored for the exponent is a problem where the design could use more clarity. I would think that the operation could still be performed, but the "unspecified" value should probably be considered indeterminate. 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