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
> > + * 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 ../../
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
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
* 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 +++
---
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