[PATCH 04/39] Check Clang 12 for __builtin_complex
Sam James
sam@gentoo.org
Sun Dec 22 02:43:52 GMT 2024
"H.J. Lu" <hjl.tools@gmail.com> writes:
> Since __builtin_complex was added to Clang 12, support __builtin_complex
> for Clang 12.
Yes, done in 6c18f7db73a08f1ae39a76a86b414c5b0c24ee86, specifically for
glibc, it seems.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> ---
> math/complex.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Sam James <sam@gentoo.org>
>
> 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))
More information about the Libc-alpha
mailing list