const-improved function macros

2025-02-08 Thread Bruno Haible via Gnulib discussion list
Functions that returns a pointer into a string passed argument, such as strchr, ought to return - a 'char *' if the argument is a 'char *', - a 'const char *' if the argument is a 'const char *'. This is now even mandated in ISO C 23 ยง 7.26.5.1. As C functions, these take a 'const char *' as

Re: intprops: new macro INT_PROMOTE

2025-02-08 Thread Bruno Haible via Gnulib discussion list
> > + * lib/intprops.h (INT_PROMOTE): New macro. > > + * tests/test-intprops.c: Test it. Additionally, there is a compilation error here: $ export CC="clang -std=gnu2x -Wincompatible-function-pointer-types" $ ./gnulib-tool --test --single-configure stdckdint-h ... In file included from ../../

Re: intprops: new macro INT_PROMOTE

2025-02-08 Thread Bruno Haible via Gnulib discussion list
Paul Eggert wrote on 2025-02-07: > + * lib/intprops.h (INT_PROMOTE): New macro. > + * tests/test-intprops.c: Test it. The test is void on compilers other than GCC and clang. This patch adds checks for all compilers, and also clarifies what INT_PROMOTE does on floats and pointers. 2025-02

Re: [PATCH] memalignment: document

2025-02-08 Thread Collin Funk
Paul Eggert writes: > * doc/gnulib-readme.texi (Other portability assumptions): > Mention the C23 function memalignment. > * doc/posix-functions/memalignment.texi: New file. > * doc/gnulib.texi (Functions in ): Include it. Thanks. I noticed C23 added two other functions that weren't a part of p

[PATCH] memalignment: document

2025-02-08 Thread Paul Eggert
* doc/gnulib-readme.texi (Other portability assumptions): Mention the C23 function memalignment. * doc/posix-functions/memalignment.texi: New file. * doc/gnulib.texi (Functions in ): Include it. --- ChangeLog | 8 doc/gnulib-readme.texi| 16 +++

[PATCH] doc: some updates for glibc 2.41

2025-02-08 Thread Paul Eggert
--- doc/posix-functions/acospi.texi | 2 +- doc/posix-functions/acospif.texi| 2 +- doc/posix-functions/acospil.texi| 2 +- doc/posix-functions/aligned_alloc.texi | 2 +- doc/posix-functions/as