Skip to content

Commit ca88a0e

Browse files
authored
[libc][complex] fix guard for cfloat128 and float128 (#119330)
1 parent 77a08a7 commit ca88a0e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

libc/src/__support/complex_type.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,12 @@ template <> struct make_complex<float16> {
3636
using type = cfloat16;
3737
};
3838
#endif
39-
#if defined(LIBC_TYPES_HAS_CFLOAT128)
40-
#if !(LIBC_TYPES_LONG_DOUBLE_IS_FLOAT128)
39+
#if defined(LIBC_TYPES_HAS_CFLOAT128) && \
40+
!defined(LIBC_TYPES_LONG_DOUBLE_IS_FLOAT128)
4141
template <> struct make_complex<float128> {
4242
using type = cfloat128;
4343
};
4444
#endif
45-
#endif
4645

4746
template <typename T> using make_complex_t = typename make_complex<T>::type;
4847

@@ -63,13 +62,12 @@ template <> struct make_real<cfloat16> {
6362
using type = float16;
6463
};
6564
#endif
66-
#if defined(LIBC_TYPES_HAS_CFLOAT128)
67-
#if !(LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE)
65+
#if defined(LIBC_TYPES_HAS_CFLOAT128) && \
66+
!defined(LIBC_TYPES_CFLOAT128_IS_COMPLEX_LONG_DOUBLE)
6867
template <> struct make_real<cfloat128> {
6968
using type = float128;
7069
};
7170
#endif
72-
#endif
7371

7472
template <typename T> using make_real_t = typename make_real<T>::type;
7573

0 commit comments

Comments
 (0)