File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
libc/include/llvm-libc-types Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 1818//
1919// TODO: Update the complex variant of C23 `_Float128` type detection again when
2020// clang supports it.
21- #if defined(__STDC_IEC_60559_COMPLEX__ ) && !defined(__clang__ )
22- #if !defined(__cplusplus )
23- #define LIBC_TYPES_HAS_CFLOAT128
24- typedef _Complex _Float128 cfloat128 ;
25- #elif defined(__GNUC__ ) && __GNUC__ >= 13
26- #define LIBC_TYPES_HAS_CFLOAT128
27- typedef _Complex _Float128 cfloat128 ;
28- #endif
29- #elif __clang_major__ >= 11 && \
21+ #ifdef __clang__
22+ #if (__clang_major__ >= 11 ) && \
3023 (defined(__FLOAT128__ ) || defined(__SIZEOF_FLOAT128__ ))
3124// Use _Complex __float128 type. clang uses __SIZEOF_FLOAT128__ or __FLOAT128__
3225// macro to notify the availability of __float128 type:
3326// https://reviews.llvm.org/D15120
3427#define LIBC_TYPES_HAS_CFLOAT128
3528typedef _Complex __float128 cfloat128 ;
36- #elif (LDBL_MANT_DIG == 113 )
29+ #endif
30+ #elif defined(__GNUC__ )
31+ #if (defined(__STDC_IEC_60559_COMPLEX__ ) || defined(__SIZEOF_FLOAT128__ )) && \
32+ (__GNUC__ >= 13 || (!defined(__cplusplus )))
33+ #define LIBC_TYPES_HAS_CFLOAT128
34+ typedef _Complex _Float128 cfloat128 ;
35+ #endif
36+ #endif
37+
38+ #if !defined(LIBC_TYPES_HAS_CFLOAT128 ) && (LDBL_MANT_DIG == 113 )
3739#define LIBC_TYPES_HAS_CFLOAT128
3840#define LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE
3941typedef _Complex long double cfloat128 ;
You can’t perform that action at this time.
0 commit comments