[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


================
@@ -7,18 +7,17 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/math/scalbnf128.h"
+#include "hdr/float_macros.h"
 #include "src/__support/FPUtil/ManipulationFunctions.h"
 #include "src/__support/common.h"
 
 namespace LIBC_NAMESPACE {
 
 LLVM_LIBC_FUNCTION(float128, scalbnf128, (float128 x, int n)) {
-// TODO: should be switched to use `FLT_RADIX` in hdr/float_macros.h" instead
-// see: https://github.com/llvm/llvm-project/issues/90496
-#if !defined(__FLT_RADIX__)
-#error __FLT_RADIX__ undefined.
-#elif __FLT_RADIX__ != 2
-#error __FLT_RADIX__!=2, unimplemented.
+#if !defined(FLT_RADIX)
----------------
nickdesaulniers wrote:

```suggestion
#ifndef FLT_RADIX
```
but this should never happen, right? Our float_macros.h header should be providing this?

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


More information about the libc-commits mailing list