[RFC v4 2/4] string: Add streq,memeq,wcseq,wmemeq,strcaseeq[_l],wcscaseeq[_l] APIs

Alejandro Colomar alx@kernel.org
Mon Sep 15 07:18:20 GMT 2025


Hi Paul,

On Sun, Sep 14, 2025 at 11:38:10PM -0700, Paul Eggert wrote:
> On 2025-09-14 22:55, Alejandro Colomar wrote:
> > > It's gotta be a function. The macro is merely icing on the cake.
> > Okay; I'll make it a function.
> 
> By the way, I didn't quite follow why we gave up on inline functions. As a
> general rule, inline functions work better than function macros these days,
> for the usual reasons.
> 
> If we gave up on inline functions merely because extern inline functions
> can't call static functions in C99, there are standard ways to handle that;
> see, for example, Gnulib's extern-inline module which has been in use since
> 2012 and which ports even to pre-C99 compilers.
> 
> If we gave up for some other reason, I missed it.

I gave up on static inline because of that.  TBH, I'd like to avoid
doing tricks where users have a hard time understanding what glibc is
doing.  I have enough trouble reading glibc sources myself already.  :)

And I had tried to avoid extern inline because of the mess that's
GNU inline vs C99 inline.

Which inline should I use?  My preference would be C99 inline.  But
then, the headers are not usable in programs that use -fgnu89-inline.
I just wish GCC dropped support for GNU inline entirely.  

Also, while there's an attribute to mark GNU inline functions as such,
there's no attribute to mark ISO inline functions as such.


Cheers,
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/20250915/de8375c3/attachment.sig>


More information about the Libc-alpha mailing list