Jump to conversation
Unresolved conversations (1)
@nickdesaulniers nickdesaulniers May 28, 2024
Should we file bug reports against clang and GCC to provide `__FLT_ROUNDS__`?
libc/include/llvm-libc-macros/float-macros.h
nickdesaulniers
Resolved conversations (6)
@nickdesaulniers nickdesaulniers May 28, 2024
Consider adding a comment explaining why it is an error if this macro doesn't have this value. The error message could be restated, too, I suspect.
Outdated
libc/src/math/generic/scalbnf128.cpp
@nickdesaulniers nickdesaulniers May 28, 2024
I still suspect this is not needed, depending on compiler version support.
Outdated
libc/hdr/float_macros.h
lntue
@nickdesaulniers nickdesaulniers May 28, 2024
Do we need a `#else` here? I suspect not. This could simply be: ```c #if FLT_RADIX != 2 #error ... #endif return fputil::... ``` or even moved outside of the function definition to make the definition crystal clear (1 statement).
Outdated
libc/src/math/generic/scalbnf128.cpp
lntue
@nickdesaulniers nickdesaulniers May 28, 2024
This pattern feels different than the rest of our hdr/ dir. Usually, the pattern is: ```c #ifdef LIBC_FULL_BUILD #include our macros #else #include system header #endif ```
Outdated
libc/hdr/float_macros.h
lntue
@nickdesaulniers nickdesaulniers May 28, 2024
```suggestion #ifndef FLT_RADIX ``` but this should never happen, right? Our float_macros.h header should be providing this?
Outdated
libc/src/math/generic/scalbnf128.cpp
lntue
@nickdesaulniers nickdesaulniers May 28, 2024
Are there any compiler versions we claim to support that don't define `__FLT_RADIX__` (or any other of the `__` prefixed/suffixed preprocessor defines)?
Outdated
libc/include/llvm-libc-macros/float-macros.h
lntue nickdesaulniers