[libc-commits] [PATCH] D144340: [libc][math] Set floating point exceptions for exp*f, sinhf, and coshf.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Feb 24 09:56:13 PST 2023


lntue added inline comments.


================
Comment at: libc/src/__support/FPUtil/FEnvImpl.h:55
+LIBC_INLINE int set_except_if_required(int excepts) {
+  if (math_errhandling & MATH_ERREXCEPT)
+    return set_except(excepts);
----------------
sivachandra wrote:
> `if constexpr (...)` here and below?
If I remember it right, last time I tried on some platform (maybe Apple clang on mac M1 ?), `math_errhandling` is defined  to be a non-constexpr builtin function call `__builtin_math_errhandling`, making if failed to compile if `math_errhandling` is put under `if constexpr`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144340/new/

https://reviews.llvm.org/D144340



More information about the libc-commits mailing list