[PATCH] build: Fix multiple test failures with Clang and lld
Joseph Myers
josmyers@redhat.com
Fri Sep 26 12:02:59 GMT 2025
On Fri, 26 Sep 2025, maozhao wrote:
> /* Absolute value of X. */
> +#if __GNUC_PREREQ (4, 9) || defined(__clang__)
> +/* Use a C11 _Generic implementation for Clang and modern GCC to provide
> + better diagnostics and avoid false positives from -Wabsolute-value. This
> + is a baseline implementation using only standard C types. */
<tgmath.h> needs to support the _FloatN and _FloatNx types. An
implementation ignoring them is not suitable.
If users building user programs with Clang get Clang's <tgmath.h> rather
than glibc's, you shouldn't be putting workarounds in the installed header
for the sake of glibc testing. Rather, you should fix Clang's header to
ensure it supports all the C23 features and GNU extensions that glibc's
header does.
--
Joseph S. Myers
josmyers@redhat.com
More information about the Libc-alpha
mailing list