[PATCH] Provide _Float128 for Clang

Sam James sam@gentoo.org
Wed Dec 18 01:55:26 GMT 2024


"H.J. Lu" <hjl.tools@gmail.com> writes:

> Since Clang doesn't provide _Float128:
>
> test-fesetexcept-traps.c:67:3: error: unknown type name '_Float128'
>    67 |   math_force_eval (b);
>       |   ^
> ../sysdeps/x86/fpu/math-barriers.h:34:49: note: expanded from macro 'math_force_eval'
>    34 |         || __builtin_types_compatible_p (__typeof (x), _Float128))      \
>       |                                                        ^
>
> provide it for Clang.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>

I defer to Joseph on this.

> ---
>  include/libc-symbols.h | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/include/libc-symbols.h b/include/libc-symbols.h
> index 4367aa6740..1add2c825f 100644
> --- a/include/libc-symbols.h
> +++ b/include/libc-symbols.h
> @@ -46,6 +46,11 @@
>     wrapper headers.  */
>  #if IS_IN (testsuite) || defined IS_IN_build || defined __cplusplus
>  # define _ISOMAC 1
> +
> +/* Provide _Float128 for Clang which doesn't predefine _Float128.  */
> +# if !defined __ASSEMBLER__ && defined __clang__
> +typedef __float128 _Float128;
> +# endif
>  #endif
>  
>  #else


More information about the Libc-alpha mailing list