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 18
18
//
19
19
// TODO: Update the complex variant of C23 `_Float128` type detection again when
20
20
// 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 ) && \
30
23
(defined(__FLOAT128__ ) || defined(__SIZEOF_FLOAT128__ ))
31
24
// Use _Complex __float128 type. clang uses __SIZEOF_FLOAT128__ or __FLOAT128__
32
25
// macro to notify the availability of __float128 type:
33
26
// https://reviews.llvm.org/D15120
34
27
#define LIBC_TYPES_HAS_CFLOAT128
35
28
typedef _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 )
37
39
#define LIBC_TYPES_HAS_CFLOAT128
38
40
#define LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE
39
41
typedef _Complex long double cfloat128 ;
You can’t perform that action at this time.
0 commit comments