]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Check Clang 12 for __builtin_complex
authorH.J. Lu <hjl.tools@gmail.com>
Sun, 22 Dec 2024 00:04:27 +0000 (08:04 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Sun, 22 Dec 2024 04:43:14 +0000 (12:43 +0800)
Since __builtin_complex was added to Clang 12, support __builtin_complex
for Clang 12.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
Reviewed-by: Sam James <sam@gentoo.org>
math/complex.h

index 29702f4ad43c760be168092ca03b5b9016de2ddb..96195387f135c1c243428456b2ff346ff9ff6ef3 100644 (file)
@@ -52,7 +52,8 @@ __BEGIN_DECLS
 #undef I
 #define I _Complex_I
 
-#if defined __USE_ISOC11 && __GNUC_PREREQ (4, 7)
+#if defined __USE_ISOC11 \
+    && (__GNUC_PREREQ (4, 7) || __glibc_clang_prereq (12, 0))
 /* Macros to expand into expression of specified complex type.  */
 # define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y))
 # define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y))