[PATCH 3/3] conform: Add C23 checks for <limits.h>

Collin Funk collin.funk1@gmail.com
Fri Apr 25 18:45:48 GMT 2025


Joseph Myers <josmyers@redhat.com> writes:

> This is missing at least __STDC_VERSION_LIMITS_H__.  We'll need to figure 
> out how to XFAIL such a test depending on the GCC version used, since 
> __STDC_VERSION_LIMITS_H__ was added in GCC 13 and GCC 12 is supported for 
> building glibc (and older versions for testing).

Thanks for the explanation.

I something like:

#if __GNUC__ >= 13
macro-int-constant __STDC_VERSION_LIMITS_H__ {long} == 202311L
#else
xfail-constant __STDC_VERSION_LIMITS_H__
#endif

will work but I haven't tested it. Likewise for the other headers, until
we decide if glibc will define them.

>> +macro-int-constant BITINT_MAXWIDTH >= 64
>
> This will also need a series of XFAILs relating to target _BitInt support, 
> referencing appropriate GCC bugs.  (And GCC version conditional XFAILs in 
> the case of testing with an older GCC version than the one adding _BitInt 
> support for a given architecture.)
[..]
> And I don't see such GCC bugs open for Alpha, ARC, CSKY, MicroBlaze or 
> OpenRISC, but those architectures are also supported by glibc and lack 
> _BitInt support in GCC so will also require such bugs (which should be 
> dependencies of the meta-bug 117580) to reference in XFAILs for the 
> absence of BITINT_MAXWIDTH.

I forgot that not all platforms support _BitInt. I'll have a look.
Thanks for the links.

Collin


More information about the Libc-alpha mailing list