[libc-commits] [libc] [libc] Implement `CMPLX` for clang < 12 (PR #157096)
Connector Switch via libc-commits
libc-commits at lists.llvm.org
Fri Sep 5 06:07:16 PDT 2025
================
@@ -22,21 +22,26 @@
// TODO: Add imaginary macros once GCC or Clang support _Imaginary builtin-type.
-#define CMPLX(x, y) __builtin_complex((double)(x), (double)(y))
-#define CMPLXF(x, y) __builtin_complex((float)(x), (float)(y))
-#define CMPLXL(x, y) __builtin_complex((long double)(x), (long double)(y))
+#if !defined(__clang__) || (__clang_major__ >= 12)
----------------
c8ef wrote:
Looks much better! Done.
https://github.com/llvm/llvm-project/pull/157096
More information about the libc-commits
mailing list