[libc-commits] [libc] [libc][complex] fix compiler support matrix for cfloat128 (PR #122593)
via libc-commits
libc-commits at lists.llvm.org
Sat Jan 11 08:16:10 PST 2025
================
@@ -18,25 +18,19 @@
//
// TODO: Update the complex variant of C23 `_Float128` type detection again when
// clang supports it.
-#if defined(__STDC_IEC_60559_COMPLEX__) && !defined(__clang__)
-#if !defined(__cplusplus)
-#define LIBC_TYPES_HAS_CFLOAT128
-typedef _Complex _Float128 cfloat128;
-#elif defined(__GNUC__) && __GNUC__ >= 13
-#define LIBC_TYPES_HAS_CFLOAT128
-typedef _Complex _Float128 cfloat128;
-#endif
-#elif __clang_major__ >= 11 && \
+#if defined(__clang__) && (__clang_major__ >= 11) && \
----------------
lntue wrote:
you should leave them in 2 levels of `#if`, with the outermost be
```
#ifdef __clang__
...
#elif defined(__GNUC__)
...
```
The reason is that clang also define `__GNUC__` macro.
https://github.com/llvm/llvm-project/pull/122593
More information about the libc-commits
mailing list