[libc] [llvm] [libc] Add proxy header for float.h. (PR #93504)
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Tue May 28 12:15:01 PDT 2024
================
@@ -32,9 +17,9 @@
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
#endif // FLT_EVAL_METHOD
-#ifndef DECIMAL_DIG
-#define DECIMAL_DIG __DECIMAL_DIG__
-#endif // DECIMAL_DIG
+#ifndef FLT_ROUNDS
+#define FLT_ROUNDS 1
----------------
nickdesaulniers wrote:
@lntue also pointed me to https://github.com/emscripten-core/emscripten/blob/main/system/lib/libc/musl/src/fenv/__flt_rounds.c. That's more sophisticated than what GCC's float.h is doing. Consider doing something similar when the builtin is available, or at least leaving behind a comment that we may want or need to change that non-builtin version some day.
https://github.com/llvm/llvm-project/pull/93504
More information about the llvm-commits
mailing list