[RFC v2 1/3] cdefs: Add __bool
Xi Ruoyao
xry111@xry111.site
Tue Sep 2 16:00:34 GMT 2025
On Tue, 2025-09-02 at 17:40 +0200, Alejandro Colomar wrote:
> 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.
commit 795add948b87c51500c306fd95acf3388787e786
Author: Vladimir N. Makarov <vmakarov@cygnus.com>
Date: Wed Jul 8 12:16:05 1998 +0000
toplev.c (lang_options): Add -Wlong-long, -Wno-long-long options.
The first release containing this commit is egcs-1.1.0.
--
Xi Ruoyao <xry111@xry111.site>
More information about the Libc-alpha
mailing list