Skip to content

Commit 8f3e7c3

Browse files
committed
fix: check that cfloat128 is not defined _Complex long double
1 parent aac000a commit 8f3e7c3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

libc/src/__support/complex_type.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ template <> struct make_complex<float16> {
3737
};
3838
#endif
3939
#if defined(LIBC_TYPES_HAS_CFLOAT128)
40+
#if (LDBL_MANT_DIG != 113)
4041
template <> struct make_complex<float128> {
4142
using type = cfloat128;
4243
};
4344
#endif
45+
#endif
4446

4547
template <typename T> using make_complex_t = typename make_complex<T>::type;
4648

@@ -62,10 +64,12 @@ template <> struct make_real<cfloat16> {
6264
};
6365
#endif
6466
#if defined(LIBC_TYPES_HAS_CFLOAT128)
67+
#if (LDBL_MANT_DIG != 113)
6568
template <> struct make_real<cfloat128> {
6669
using type = float128;
6770
};
6871
#endif
72+
#endif
6973

7074
template <typename T> using make_real_t = typename make_real<T>::type;
7175

0 commit comments

Comments
 (0)