[libc-commits] [clang] [libc] [clang] Make __builtin_exp and __builtin_expf constexpr. (PR #199808)
via libc-commits
libc-commits at lists.llvm.org
Fri Jun 19 13:10:16 PDT 2026
================
@@ -57,6 +57,12 @@ template <> struct Bounds<double> {
} // namespace exp_internal
template <typename T> LIBC_INLINE int exp_exceptions(T x, int rounding_mode) {
+ static_assert(FE_OVERFLOW != 0);
+ static_assert(FE_UNDERFLOW != 0);
+ static_assert(FE_INEXACT != 0);
+ static_assert(FE_INVALID != 0);
+ static_assert(FE_DIVBYZERO != 0);
+
----------------
lntue wrote:
@hubert-reinterpretcast I just temporarily added them to see if those macros are not defined or defined as 0 in the CIs. Because I cannot reproduce the failures in the CIs, and I suspected that the `FE_*` were 0? The tests all passed locally for me, even with the same cmake commands from the CIs. These assertion will be removed later.
https://github.com/llvm/llvm-project/pull/199808
More information about the libc-commits
mailing list