[clang] [C++23] [CLANG] Adding C++23 constexpr math functions: fmin and frexp. (PR #88978)

Zahira Ammarguellat via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 07:54:58 PDT 2024


================
@@ -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()) {
----------------
zahiraam wrote:

> There's an open CWG issue ([CWG2168](https://cplusplus.github.io/CWG/issues/2168.html)) about this.

That's referring to INFINITY though. This is more specifically about NAN.

https://github.com/llvm/llvm-project/pull/88978


More information about the cfe-commits mailing list