[RFC v2 1/3] cdefs: Add __bool
Alejandro Colomar
alx@kernel.org
Tue Sep 2 15:40:29 GMT 2025
Hi,
On Tue, Sep 02, 2025 at 03:27:31PM +0000, Wilco Dijkstra wrote:
> Hi,
>
> >> This seems entirely possible, given the glibc documentation requires
> >> GCC 12.1 at least.
> >> <https://sourceware.org/glibc/manual/latest/html_node/Tools-for-Compilation.html>
> >
> > That's about building glibc itself, but <sys/cdefs.h> is an installed
> > header which must support arbitrary compilers.
>
> We still need to define "arbitrary" here. In [1] I asked a while back:
>
> On a related note, we still have various __GNU_PREREQ (2, 4) in our headers.
> Does anyone ever test such ancient compilers/binutils still work with GLIBC?
> At which point do we consider them obsolete? Would it be reasonable to also
> set a minimum version here which trails the minimum GLIBC build compiler by
> say 5 years?
>
> So if we could set minimum GCC version to use headers to GCC 7, we'd be able
> to get rid of a whole lot of clutter:
>
> > grep "__GNUC_PREREQ\s*([1-7]" -R * | wc
> 1467
>
> That's 5000+ lines of #ifdef/else/endif alone.
+1
Plus, we already require 'long long' to exist (<stdlib.h> at least uses
freely). When was it added to GCC? That would help determining an
implicit version we're already requiring.
Have a lovely day!
Alex
>
> Cheers,
> Wilco
>
> [1] https://sourceware.org/pipermail/libc-alpha/2024-October/160713.html
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250902/cb2a82ce/attachment.sig>
More information about the Libc-alpha
mailing list