[PATCH] conform: add ISO23 data for __STDC_VERSION_*__

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Mon Nov 23 13:05:49 GMT 2026


This does not apply to master by itself: the assert.h-data hunk needs
"conform: don't expect macros for new C23 keywords" first. Another point where
sending this a patchset would make more sense.

The other C23 headers with a version macro (stdatomic.h, stdbit.h and
stdckdint.h) have no data files yet.  stdbit.h at least is installed by
glibc and should get one in a follow-up.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

On 26/10/26 06:35, Andreas Schwab wrote:
> 
> ---
>  conform/data/assert.h-data   | 4 ++++
>  conform/data/complex.h-data  | 4 ++++
>  conform/data/fenv.h-data     | 4 ++++
>  conform/data/float.h-data    | 4 ++++
>  conform/data/inttypes.h-data | 4 ++++
>  conform/data/limits.h-data   | 4 ++++
>  conform/data/math.h-data     | 4 ++++
>  conform/data/setjmp.h-data   | 4 ++++
>  conform/data/stdarg.h-data   | 4 ++++
>  conform/data/stddef.h-data   | 4 ++++
>  conform/data/stdint.h-data   | 4 ++++
>  conform/data/stdio.h-data    | 4 ++++
>  conform/data/stdlib.h-data   | 4 ++++
>  conform/data/string.h-data   | 4 ++++
>  conform/data/tgmath.h-data   | 4 ++++
>  conform/data/time.h-data     | 4 ++++
>  conform/data/uchar.h-data    | 4 ++++
>  conform/data/wchar.h-data    | 4 ++++
>  18 files changed, 72 insertions(+)
> 
> diff --git a/conform/data/assert.h-data b/conform/data/assert.h-data
> index 883736e039..a607dde921 100644
> --- a/conform/data/assert.h-data
> +++ b/conform/data/assert.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_ASSERT_H__ == 202311L
> +#endif
> +
>  macro assert
>  
>  #if defined ISO11 || defined XOPEN2K24 || defined POSIX2024
> diff --git a/conform/data/complex.h-data b/conform/data/complex.h-data
> index 9b746abe00..d4dc19f3c0 100644
> --- a/conform/data/complex.h-data
> +++ b/conform/data/complex.h-data
> @@ -1,4 +1,8 @@
>  #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_COMPLEX_H__ == 202311L
> +#endif
> +
>  macro complex
>  macro _Complex_I
>  optional-macro imaginary
> diff --git a/conform/data/fenv.h-data b/conform/data/fenv.h-data
> index b3f674cc09..3948d3d108 100644
> --- a/conform/data/fenv.h-data
> +++ b/conform/data/fenv.h-data
> @@ -1,4 +1,8 @@
>  #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_FENV_H__ == 202311L
> +#endif
> +
>  type fenv_t
>  type fexcept_t
>  
> diff --git a/conform/data/float.h-data b/conform/data/float.h-data
> index 350d61f452..7ede63e7e0 100644
> --- a/conform/data/float.h-data
> +++ b/conform/data/float.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_FLOAT_H__ == 202311L
> +#endif
> +
>  macro-int-constant FLT_RADIX >= 2
>  
>  macro FLT_ROUNDS
> diff --git a/conform/data/inttypes.h-data b/conform/data/inttypes.h-data
> index 2ae5b951be..ac9a271cc8 100644
> --- a/conform/data/inttypes.h-data
> +++ b/conform/data/inttypes.h-data
> @@ -1,6 +1,10 @@
>  #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
>  #include "stdint.h-data"
>  
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_INTTYPES_H__ == 202311L
> +#endif
> +
>  type imaxdiv_t
>  element imaxdiv_t intmax_t rem
>  element imaxdiv_t intmax_t quot
> diff --git a/conform/data/limits.h-data b/conform/data/limits.h-data
> index 95202cb386..5dbb76a683 100644
> --- a/conform/data/limits.h-data
> +++ b/conform/data/limits.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_LIMITS_H__ == 202311L
> +#endif
> +
>  macro-int-constant CHAR_BIT >= 8
>  macro-int-constant SCHAR_MIN {promoted:signed char} <= -127
>  macro-int-constant SCHAR_MAX {promoted:signed char} >= 127
> diff --git a/conform/data/math.h-data b/conform/data/math.h-data
> index b03b3e78d7..17c9919d1c 100644
> --- a/conform/data/math.h-data
> +++ b/conform/data/math.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_MATH_H__ == 202311L
> +#endif
> +
>  macro-constant HUGE_VAL {double}
>  
>  #if !defined ISO && !defined POSIX
> diff --git a/conform/data/setjmp.h-data b/conform/data/setjmp.h-data
> index f0d1892574..fe8791eb0a 100644
> --- a/conform/data/setjmp.h-data
> +++ b/conform/data/setjmp.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_SETJMP_H__ == 202311L
> +#endif
> +
>  type jmp_buf
>  #if !defined ISO && !defined ISO99 && !defined ISO11 && !defined ISO23
>  type sigjmp_buf
> diff --git a/conform/data/stdarg.h-data b/conform/data/stdarg.h-data
> index fa97249ba2..54c26b1124 100644
> --- a/conform/data/stdarg.h-data
> +++ b/conform/data/stdarg.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STDARG_H__ == 202311L
> +#endif
> +
>  type va_list
>  
>  // XXX We didn't check the parameters.
> diff --git a/conform/data/stddef.h-data b/conform/data/stddef.h-data
> index e9b8fe89ee..a060c8b962 100644
> --- a/conform/data/stddef.h-data
> +++ b/conform/data/stddef.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STDDEF_H__ == 202311L
> +#endif
> +
>  macro-constant NULL == 0
>  
>  macro offsetof
> diff --git a/conform/data/stdint.h-data b/conform/data/stdint.h-data
> index 5d65d4ecd5..df37e4d82a 100644
> --- a/conform/data/stdint.h-data
> +++ b/conform/data/stdint.h-data
> @@ -1,4 +1,8 @@
>  #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STDINT_H__ == 202311L
> +#endif
> +
>  // The requirements for some types and corresponding macros are from POSIX.
>  type int8_t
>  type int16_t
> diff --git a/conform/data/stdio.h-data b/conform/data/stdio.h-data
> index 4104d8bcc5..5873335b23 100644
> --- a/conform/data/stdio.h-data
> +++ b/conform/data/stdio.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STDIO_H__ == 202311L
> +#endif
> +
>  macro-int-constant BUFSIZ >= 256
>  macro-int-constant FILENAME_MAX
>  macro-int-constant FOPEN_MAX >= 8
> diff --git a/conform/data/stdlib.h-data b/conform/data/stdlib.h-data
> index 1c4ba97762..2fc18f013b 100644
> --- a/conform/data/stdlib.h-data
> +++ b/conform/data/stdlib.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STDLIB_H__ == 202311L
> +#endif
> +
>  type div_t
>  element div_t int quot
>  element div_t int rem
> diff --git a/conform/data/string.h-data b/conform/data/string.h-data
> index 4c968dbbf8..f449ca36ca 100644
> --- a/conform/data/string.h-data
> +++ b/conform/data/string.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_STRING_H__ == 202311L
> +#endif
> +
>  macro-constant NULL == 0
>  
>  type size_t
> diff --git a/conform/data/tgmath.h-data b/conform/data/tgmath.h-data
> index d852adc3e4..b5f2ed42a7 100644
> --- a/conform/data/tgmath.h-data
> +++ b/conform/data/tgmath.h-data
> @@ -2,6 +2,10 @@
>  #include "math.h-data"
>  #include "complex.h-data"
>  
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_TGMATH_H__ == 202311L
> +#endif
> +
>  macro acos
>  macro asin
>  macro atan
> diff --git a/conform/data/time.h-data b/conform/data/time.h-data
> index 972b109b58..dbdd17018a 100644
> --- a/conform/data/time.h-data
> +++ b/conform/data/time.h-data
> @@ -1,3 +1,7 @@
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_TIME_H__ == 202311L
> +#endif
> +
>  macro-constant NULL == 0
>  macro CLOCKS_PER_SEC {clock_t}
>  
> diff --git a/conform/data/uchar.h-data b/conform/data/uchar.h-data
> index ed9d1b2d9f..4e8caabb6f 100644
> --- a/conform/data/uchar.h-data
> +++ b/conform/data/uchar.h-data
> @@ -1,4 +1,8 @@
>  #if defined ISO11 || defined ISO23 || defined XOPEN2K24 || defined POSIX2024
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_UCHAR_H__ == 202311L
> +#endif
> +
>  type mbstate_t
>  type size_t
>  type char16_t
> diff --git a/conform/data/wchar.h-data b/conform/data/wchar.h-data
> index 625637d66c..2d68d52b3d 100644
> --- a/conform/data/wchar.h-data
> +++ b/conform/data/wchar.h-data
> @@ -1,4 +1,8 @@
>  #if !defined ISO && !defined POSIX && !defined XPG4 && !defined XPG42
> +#if defined ISO23
> +macro-int-constant __STDC_VERSION_WCHAR_H__ == 202311L
> +#endif
> +
>  type wchar_t
>  type wint_t
>  # if !defined ISO99 && !defined ISO11 && !defined ISO23 && !defined POSIX2008 && !defined POSIX2024



More information about the Libc-alpha mailing list