diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2024-12-22 08:04:27 +0800 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2024-12-22 12:43:14 +0800 |
| commit | 6d9d7865d029e94d1aee24c609f4d222d0620fff (patch) | |
| tree | 6ec654ffd5b8b4ec9260150632f98a9cd39bdbff /math | |
| parent | a0704d9fc68a84f3e7d29179c3f907fe3f10b2c3 (diff) | |
| download | glibc-6d9d7865d029e94d1aee24c609f4d222d0620fff.tar.xz glibc-6d9d7865d029e94d1aee24c609f4d222d0620fff.zip | |
Check Clang 12 for __builtin_complex
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>
Diffstat (limited to 'math')
| -rw-r--r-- | math/complex.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/math/complex.h b/math/complex.h index 29702f4ad4..96195387f1 100644 --- a/math/complex.h +++ b/math/complex.h @@ -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)) |
