[PATCH] conform: add ISO23 definitions to the checking scripts
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Mon Nov 23 13:01:17 GMT 2026
On 21/10/26 07:40, Andreas Schwab wrote:
>
> ---
> conform/glibcconform.py | 7 +++++++
> conform/list-header-symbols.py | 1 +
> 2 files changed, 8 insertions(+)
>
> diff --git a/conform/glibcconform.py b/conform/glibcconform.py
> index 5caf465bce..4105de77e6 100644
> --- a/conform/glibcconform.py
> +++ b/conform/glibcconform.py
> @@ -27,6 +27,7 @@ import tempfile
> CFLAGS = {'ISO': '-ansi',
> 'ISO99': '-std=c99',
> 'ISO11': '-std=c11',
> + 'ISO23': '-std=c23',
> 'POSIX': '-D_POSIX_C_SOURCE=199506L -ansi',
> 'XPG4': '-ansi -D_XOPEN_SOURCE',
> 'XPG42': '-ansi -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED',
There is no ISO23 to conform/Makefile, so none of the new data is used
yet. However, we still support GCC 12/13, which do not have support for
-std=c23.
I am not sure we should raise minimal support to GCC 14 (which seems a hard
bump), or add a configure check.
It also a bit confusing that you sent this disjointed patches to cover C23,
I would suggest you to send them in a patchset.
Some C23 headers have changes that no patch covers:
* string.h: memccpy and strdup are still gated with !defined ISO23,
and strndup and memset_explicit are not expected for ISO23.
* stdio.h: _PRINTF_NAN_LEN_MAX is not expected.
* stdbit.h: there is no data file, although glibc installs it.
The string.h and stdio.h items pass on x86_64 once added:
* string.h-data: drop "&& !defined ISO23" from the memccpy and strdup
conditions, add "defined ISO23" to the strndup condition (split from
strnlen), and add under ISO23: function {void*} memset_explicit (void*, int, size_t)
* stdio.h-data, under ISO23: macro-int-constant _PRINTF_NAN_LEN_MAX
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> @@ -50,10 +51,16 @@ KEYWORDS_C99 = KEYWORDS_C90 | {'inline', 'restrict'}
> # ISO C17 keywords.
> KEYWORDS_C17 = KEYWORDS_C99
>
> +# ISO C23 keywords.
> +KEYWORDS_C23 = KEYWORDS_C17 | {'alignas', 'alignof', 'bool', 'false',
> + 'nullptr', 'thread_local', 'true', 'typeof',
> + 'typeof_unqual', 'constexpr', 'static_assert'}
> +
> # Keywords for each standard.
> KEYWORDS = {'ISO': KEYWORDS_C90,
> 'ISO99': KEYWORDS_C99,
> 'ISO11': KEYWORDS_C99,
> + 'ISO23': KEYWORDS_C23,
> 'POSIX': KEYWORDS_C90,
> 'XPG4': KEYWORDS_C90,
> 'XPG42': KEYWORDS_C90,
> diff --git a/conform/list-header-symbols.py b/conform/list-header-symbols.py
> index 6b5e9805ee..f1adfe6beb 100644
> --- a/conform/list-header-symbols.py
> +++ b/conform/list-header-symbols.py
> @@ -33,6 +33,7 @@ EXTRA_SYMS['ISO99'] = EXTRA_SYMS['ISO'] | {'math_errhandling'}
> # the generic functions there or may not be defined with external
> # linkage (but are reserved in any case).
> EXTRA_SYMS['ISO11'] = EXTRA_SYMS['ISO99']
> +EXTRA_SYMS['ISO23'] = EXTRA_SYMS['ISO11']
> # The following lists may not be exhaustive.
> EXTRA_SYMS['POSIX'] = (EXTRA_SYMS['ISO']
> | {'environ', 'sigsetjmp', 'optarg', 'optind', 'opterr',
More information about the Libc-alpha
mailing list