[PATCH v3 3/7] Assume support for __extension__ ({ })

Alejandro Colomar alx@kernel.org
Tue Nov 11 11:47:31 GMT 2025


Hi Arsen,

On Tue, Nov 11, 2025 at 10:14:41AM +0100, Arsen Arsenović wrote:
> Alejandro Colomar <alx@kernel.org> writes:
> 
> > That triggers the question: What is a C compiler?
> >
> > Because if that includes a K&R C compiler, glibc clearly requires
> > something better than that.  glibc requires at least ANSI C89.
> 
> The manual states (in (libc)ISO C):
> 
>   The GNU C Library is compatible with the C standard adopted by the
>   American National Standards Institute (ANSI): ‘American National
>   Standard X3.159-1989--"ANSI C"’ and later by the International
>   Standardization Organization (ISO): ‘ISO/IEC 9899:1990, "Programming
>   languages--C"’.  We here refer to the standard as ISO C since this is
>   the more general standard in respect of ratification.  The header
>   files and library facilities that make up the GNU C Library are a
>   superset of those specified by the ISO C standard.
> 
> ... so, probably any ANSI C (or better) compiler.

Yup, so there's some (relatively) arbitrary cut line.  I'd like to move
that line to some higher arbitrary point.

I think 'long long' is one feature we could require to any compiler.
'_Bool' is another.  I agree statement expressions could be too much.

I'll reduce my patch set to just 'long long' for now, to get the ball
rolling, and see where we go from there.

As a very long term plan, I hope we can bump to ISO C99, but as Zack
said, we can't bump that at once, and should instead go feature by
feature.

From C99, I'm especially interested in:

-  long long
-  _Bool
-  restrict
-  inline

I expect every compiler supports 'long long'.  _Bool is also likely to
be implemented by most compilers.  The other two, I'm not so sure. 
We'll see.


Have a lovely day!
Alex

-- 
<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/20251111/9b2270c5/attachment.sig>


More information about the Libc-alpha mailing list