[libc-commits] [libc] [llvm] [libc] Add proxy header for float.h. (PR #93504)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue May 28 09:56:38 PDT 2024
================
@@ -9,165 +9,346 @@
#ifndef LLVM_LIBC_MACROS_FLOAT_MACROS_H
#define LLVM_LIBC_MACROS_FLOAT_MACROS_H
-// Suppress `#include_next is a language extension` warnings.
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wgnu-include-next"
-#pragma clang diagnostic ignored "-Winclude-next-absolute-path"
-#else // gcc
-#pragma GCC system_header
-#endif //__clang__
-
-#include_next <float.h>
-
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif //__clang__
+// Check long double.
+#if defined(__linux__) && defined(__x86_64__)
+#define LLVM_LIBC_MACROS_LONG_DOUBLE_IS_FLOAT80
+#elif defined(__linux__) && (defined(__aarch64__) || defined(__riscv))
+#define LLVM_LIBC_MACROS_LONG_DOUBLE_IS_FLOAT128
+#else
+#define LLVM_LIBC_MACROS_LONG_DOUBLE_IS_FLOAT64
+#endif
#ifndef FLT_RADIX
+#ifdef __FLT_RADIX__
----------------
nickdesaulniers wrote:
Are there any compiler versions we claim to support that don't define `__FLT_RADIX` (or any other of the `__` prefixed/suffixed preprocessor defines)?
https://github.com/llvm/llvm-project/pull/93504
More information about the libc-commits
mailing list