[libc-commits] [libc] [libc] Add __FE_DENORM to the fenv macros (PR #91353)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue May 7 10:19:47 PDT 2024


================
@@ -9,11 +9,12 @@
 #ifndef LLVM_LIBC_MACROS_FENV_MACROS_H
 #define LLVM_LIBC_MACROS_FENV_MACROS_H
 
-#define FE_DIVBYZERO 1
-#define FE_INEXACT 2
-#define FE_INVALID 4
-#define FE_OVERFLOW 8
-#define FE_UNDERFLOW 16
+#define FE_DIVBYZERO 0x1
+#define FE_INEXACT 0x2
+#define FE_INVALID 0x4
+#define FE_OVERFLOW 0x8
+#define FE_UNDERFLOW 0x10
+#define __FE_DENORM 0x20
----------------
jhuber6 wrote:

Hm, for now `64` is probably safe enough. Unsure if it's worth the effort since we'd need to make some variadic max function. That'd probably be doable with constexpr functions and C++ magic, but with macros it seems like a big pain unless we want to invoke an actual function call.

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


More information about the libc-commits mailing list