in order to support unsigned __int128 and/or unsigned _BitInt(N) operands
with arbitrary precisions when supported by the target.
+* The GNU C Library now supports a feature test macro _ISOC23_SOURCE to
+ enable features from the ISO C23 standard. Only some features from
+ this standard are supported by the GNU C Library. The older name
+ _ISOC2X_SOURCE is still supported. Features from C23 are also enabled
+ by _GNU_SOURCE, or by compiling with the GCC options -std=c23,
+ -std=gnu23, -std=c2x or -std=gnu2x.
+
Deprecated and removed features, and other changes affecting compatibility:
[Add deprecations, removals and changes affecting compatibility here]
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((const fenv_t *) -1l)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
/* ISO/IEC TS 18661-1:2014 defines the __STDC_WANT_IEC_60559_BFP_EXT__
macro. Most but not all symbols enabled by that macro in TS
- 18661-1 are enabled unconditionally in C2X. In C2X, the symbols in
+ 18661-1 are enabled unconditionally in C23. In C23, the symbols in
Annex F still require a new feature test macro
- __STDC_WANT_IEC_60559_EXT__ instead (C2X does not define
+ __STDC_WANT_IEC_60559_EXT__ instead (C23 does not define
__STDC_WANT_IEC_60559_BFP_EXT__), while a few features from TS
- 18661-1 are not included in C2X (and thus should depend on
- __STDC_WANT_IEC_60559_BFP_EXT__ even when C2X features are
+ 18661-1 are not included in C23 (and thus should depend on
+ __STDC_WANT_IEC_60559_BFP_EXT__ even when C23 features are
enabled).
__GLIBC_USE (IEC_60559_BFP_EXT) controls those features from TS
- 18661-1 not included in C2X.
+ 18661-1 not included in C23.
- __GLIBC_USE (IEC_60559_BFP_EXT_C2X) controls those features from TS
- 18661-1 that are also included in C2X (with no feature test macro
- required in C2X).
+ __GLIBC_USE (IEC_60559_BFP_EXT_C23) controls those features from TS
+ 18661-1 that are also included in C23 (with no feature test macro
+ required in C23).
__GLIBC_USE (IEC_60559_EXT) controls those features from TS 18661-1
- that are included in C2X but conditional on
+ that are included in C23 but conditional on
__STDC_WANT_IEC_60559_EXT__. (There are currently no features
conditional on __STDC_WANT_IEC_60559_EXT__ that are not in TS
18661-1.) */
#else
# define __GLIBC_USE_IEC_60559_BFP_EXT 0
#endif
-#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
-#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC2X)
-# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
+#undef __GLIBC_USE_IEC_60559_BFP_EXT_C23
+#if __GLIBC_USE (IEC_60559_BFP_EXT) || __GLIBC_USE (ISOC23)
+# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 1
#else
-# define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 0
+# define __GLIBC_USE_IEC_60559_BFP_EXT_C23 0
#endif
#undef __GLIBC_USE_IEC_60559_EXT
#if __GLIBC_USE (IEC_60559_BFP_EXT) || defined __STDC_WANT_IEC_60559_EXT__
/* ISO/IEC TS 18661-4:2015 defines the
__STDC_WANT_IEC_60559_FUNCS_EXT__ macro. Other than the reduction
functions, the symbols from this TS are enabled unconditionally in
- C2X. */
+ C23. */
#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
#if defined __USE_GNU || defined __STDC_WANT_IEC_60559_FUNCS_EXT__
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
#else
# define __GLIBC_USE_IEC_60559_FUNCS_EXT 0
#endif
-#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
-#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC2X)
-# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
+#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C23
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT) || __GLIBC_USE (ISOC23)
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 1
#else
-# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 0
+# define __GLIBC_USE_IEC_60559_FUNCS_EXT_C23 0
#endif
/* ISO/IEC TS 18661-3:2015 defines the
__STRICT_ANSI__ ISO Standard C.
_ISOC99_SOURCE Extensions to ISO C89 from ISO C99.
_ISOC11_SOURCE Extensions to ISO C99 from ISO C11.
- _ISOC2X_SOURCE Extensions to ISO C99 from ISO C2X.
+ _ISOC23_SOURCE Extensions to ISO C99 from ISO C23.
+ _ISOC2X_SOURCE Old name for _ISOC23_SOURCE.
__STDC_WANT_LIB_EXT2__
Extensions to ISO C99 from TR 27431-2:2010.
__STDC_WANT_IEC_60559_BFP_EXT__
__STDC_WANT_IEC_60559_TYPES_EXT__
Extensions to ISO C11 from TS 18661-3:2015.
__STDC_WANT_IEC_60559_EXT__
- ISO C2X interfaces defined only in Annex F.
+ ISO C23 interfaces defined only in Annex F.
_POSIX_SOURCE IEEE Std 1003.1.
_POSIX_C_SOURCE If ==1, like _POSIX_SOURCE; if >=2 add IEEE Std 1003.2;
#undef __USE_GNU
#undef __USE_FORTIFY_LEVEL
#undef __KERNEL_STRICT_NAMES
-#undef __GLIBC_USE_ISOC2X
+#undef __GLIBC_USE_ISOC23
#undef __GLIBC_USE_DEPRECATED_GETS
#undef __GLIBC_USE_DEPRECATED_SCANF
-#undef __GLIBC_USE_C2X_STRTOL
+#undef __GLIBC_USE_C23_STRTOL
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
# define _DEFAULT_SOURCE 1
#endif
+/* Remap the old name _ISOC2X_SOURCE to _ISOC23_SOURCE. */
+#ifdef _ISOC2X_SOURCE
+# undef _ISOC2X_SOURCE
+# undef _ISOC23_SOURCE
+# define _ISOC23_SOURCE 1
+#endif
+
/* If _GNU_SOURCE was defined by the user, turn on all the other features. */
#ifdef _GNU_SOURCE
# undef _ISOC95_SOURCE
# define _ISOC99_SOURCE 1
# undef _ISOC11_SOURCE
# define _ISOC11_SOURCE 1
-# undef _ISOC2X_SOURCE
-# define _ISOC2X_SOURCE 1
+# undef _ISOC23_SOURCE
+# define _ISOC23_SOURCE 1
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
#if (defined _DEFAULT_SOURCE \
|| (!defined __STRICT_ANSI__ \
&& !defined _ISOC99_SOURCE && !defined _ISOC11_SOURCE \
- && !defined _ISOC2X_SOURCE \
+ && !defined _ISOC23_SOURCE \
&& !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE \
&& !defined _XOPEN_SOURCE))
# undef _DEFAULT_SOURCE
# define _DEFAULT_SOURCE 1
#endif
-/* This is to enable the ISO C2X extension. */
-#if (defined _ISOC2X_SOURCE \
+/* This is to enable the ISO C23 extension. */
+#if (defined _ISOC23_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
-# define __GLIBC_USE_ISOC2X 1
+# define __GLIBC_USE_ISOC23 1
#else
-# define __GLIBC_USE_ISOC2X 0
+# define __GLIBC_USE_ISOC23 0
#endif
/* This is to enable the ISO C11 extension. */
-#if (defined _ISOC11_SOURCE || defined _ISOC2X_SOURCE \
+#if (defined _ISOC11_SOURCE || defined _ISOC23_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 201112L))
# define __USE_ISOC11 1
#endif
/* This is to enable the ISO C99 extension. */
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || defined _ISOC2X_SOURCE \
+ || defined _ISOC23_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
# define __USE_ISOC99 1
#endif
/* This is to enable the ISO C90 Amendment 1:1995 extension. */
#if (defined _ISOC99_SOURCE || defined _ISOC11_SOURCE \
- || defined _ISOC2X_SOURCE \
+ || defined _ISOC23_SOURCE \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199409L))
# define __USE_ISOC95 1
#endif
# define __GLIBC_USE_DEPRECATED_SCANF 0
#endif
-/* ISO C2X added support for a 0b or 0B prefix on binary constants as
+/* ISO C23 added support for a 0b or 0B prefix on binary constants as
inputs to strtol-family functions (base 0 or 2). This macro is
used to condition redirection in headers to allow that redirection
to be disabled when building those functions, despite _GNU_SOURCE
being defined. */
-#if __GLIBC_USE (ISOC2X)
-# define __GLIBC_USE_C2X_STRTOL 1
+#if __GLIBC_USE (ISOC23)
+# define __GLIBC_USE_C23_STRTOL 1
#else
-# define __GLIBC_USE_C2X_STRTOL 0
+# define __GLIBC_USE_C23_STRTOL 0
#endif
/* Get definitions of __STDC_* predefined macros, if the compiler has
/* The integer width macros are not defined by GCC's <limits.h> before
GCC 7, or if _GNU_SOURCE rather than
__STDC_WANT_IEC_60559_BFP_EXT__ is used to enable this feature. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# ifndef CHAR_WIDTH
# define CHAR_WIDTH 8
# endif
#endif /* Use IEC_60559_BFP_EXT. */
/* The macros for _Bool are not defined by GCC's <limits.h> before GCC
- 11, or if _GNU_SOURCE is defined rather than enabling C2x support
+ 11, or if _GNU_SOURCE is defined rather than enabling C23 support
with -std. */
-#if __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (ISOC23)
# ifndef BOOL_MAX
# define BOOL_MAX 1
# endif
libc_hidden_proto (__isoc23_vsscanf)
libc_hidden_proto (__isoc23_vfscanf)
-/* Internal uses of sscanf should call the C2X-compliant version.
+/* Internal uses of sscanf should call the C23-compliant version.
Unfortunately, symbol redirection is not transitive, so the
__REDIRECT in the public header does not link up with the above
libc_hidden_proto. Bridge the gap with a macro. */
libc_hidden_proto (__isoc23_strtoll_l)
libc_hidden_proto (__isoc23_strtoull_l)
-#if __GLIBC_USE (C2X_STRTOL)
-/* Redirect internal uses of these functions to the C2X versions; the
+#if __GLIBC_USE (C23_STRTOL)
+/* Redirect internal uses of these functions to the C23 versions; the
redirection in the installed header does not work with
libc_hidden_proto. */
# undef strtol
libc_hidden_proto (__isoc23_wcstoll_l)
libc_hidden_proto (__isoc23_wcstoull_l)
-#if __GLIBC_USE (C2X_STRTOL)
-/* Redirect internal uses of these functions to the C2X versions; the
+#if __GLIBC_USE (C23_STRTOL)
+/* Redirect internal uses of these functions to the C23 versions; the
redirection in the installed header does not work with
libc_hidden_proto. */
# undef wcstol
__LDBL_REDIR_DECL (vsprintf)
#if !__GLIBC_USE (DEPRECATED_SCANF)
# if defined __LDBL_COMPAT
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (fscanf, __nldbl___isoc23_fscanf)
__LDBL_REDIR1_DECL (scanf, __nldbl___isoc23_scanf)
__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc23_sscanf)
__LDBL_REDIR1_DECL (sscanf, __nldbl___isoc99_sscanf)
# endif
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (fscanf, __isoc23_fscanfieee128)
__LDBL_REDIR1_DECL (scanf, __isoc23_scanfieee128)
__LDBL_REDIR1_DECL (sscanf, __isoc23_sscanfieee128)
#ifdef __USE_ISOC99
# if !__GLIBC_USE (DEPRECATED_SCANF)
# if defined __LDBL_COMPAT
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc23_vfscanf)
__LDBL_REDIR1_DECL (vscanf, __nldbl___isoc23_vscanf)
__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc23_vsscanf)
__LDBL_REDIR1_DECL (vsscanf, __nldbl___isoc99_vsscanf)
# endif
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (vfscanf, __isoc23_vfscanfieee128)
__LDBL_REDIR1_DECL (vscanf, __isoc23_vscanfieee128)
__LDBL_REDIR1_DECL (vsscanf, __isoc23_vsscanfieee128)
#define FOPEN_MAX 16
-#if __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (ISOC23)
/* Maximum length of printf output for a NaN. */
# define _PRINTF_NAN_LEN_MAX 4
#endif
#include <bits/floatn.h>
#if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
&& __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
const char *__restrict __format, ...),
/* Same redirection as above for the v*scanf family. */
# if !__GLIBC_USE (DEPRECATED_SCANF)
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# if defined __REDIRECT && !defined __LDBL_COMPAT \
&& __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
extern int __REDIRECT (vfscanf,
floating-point number); if @var{x} is not a NaN, they return
@minus{}1. They raise no floating-point exceptions even for signaling
NaNs. (The return value of @minus{}1 for an argument that is not a
-NaN is specified in C2x; the value was unspecified in TS 18661.)
+NaN is specified in C23; the value was unspecified in TS 18661.)
@end deftypefun
@deftypefun int setpayload (double *@var{x}, double @var{payload})
@deftypefunx {long double} fminimuml (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fminimumfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fminimumfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{fminimum} function returns the lesser of the two values @var{x}
and @var{y}. Unlike @code{fmin}, if either argument is a NaN, NaN is returned.
@deftypefunx {long double} fmaximuml (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fmaximumfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fmaximumfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{fmaximum} function returns the greater of the two values @var{x}
and @var{y}. Unlike @code{fmax}, if either argument is a NaN, NaN is returned.
@deftypefunx {long double} fminimum_numl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fminimum_numfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fminimum_numfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{fminimum_num} function returns the lesser of the two values
@var{x} and @var{y}. If one argument is a number and the other is a
@deftypefunx {long double} fmaximum_numl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fmaximum_numfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fmaximum_numfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{fmaximum_num} function returns the greater of the two values
@var{x} and @var{y}. If one argument is a number and the other is a
@deftypefunx {long double} fminimum_magl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fminimum_magfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fminimum_magfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return whichever of the two values @var{x} and @var{y}
has the smaller absolute value. If both have the same absolute value,
@deftypefunx {long double} fmaximum_magl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fmaximum_magfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fmaximum_magfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return whichever of the two values @var{x} and @var{y}
has the greater absolute value. If both have the same absolute value,
@deftypefunx {long double} fminimum_mag_numl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fminimum_mag_numfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fminimum_mag_numfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return whichever of the two values @var{x} and @var{y}
has the smaller absolute value. If both have the same absolute value,
@deftypefunx {long double} fmaximum_mag_numl (long double @var{x}, long double @var{y})
@deftypefunx _FloatN fmaximum_mag_numfN (_Float@var{N} @var{x}, _Float@var{N} @var{y})
@deftypefunx _FloatNx fmaximum_mag_numfNx (_Float@var{N}x @var{x}, _Float@var{N}x @var{y})
-@standards{C2X, math.h}
+@standards{C23, math.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
These functions return whichever of the two values @var{x} and @var{y}
has the greater absolute value. If both have the same absolute value,
If @var{base} is zero, decimal radix is assumed unless the series of
digits begins with @samp{0} (specifying octal radix), or @samp{0x} or
@samp{0X} (specifying hexadecimal radix), or @samp{0b} or @samp{0B}
-(specifying binary radix; only supported when C2X features are
+(specifying binary radix; only supported when C23 features are
enabled); in other words, the same syntax used for integer constants in C.
Otherwise @var{base} must have a value between @code{2} and @code{36}.
If @var{base} is @code{16}, the digits may optionally be preceded by
-@samp{0x} or @samp{0X}. If @var{base} is @code{2}, and C2X features
+@samp{0x} or @samp{0X}. If @var{base} is @code{2}, and C23 features
are enabled, the digits may optionally be preceded by
@samp{0b} or @samp{0B}. If base has no legal value the value returned
is @code{0l} and the global variable @code{errno} is set to @code{EINVAL}.
If this macro is defined, ISO C11 extensions to ISO C99 are included.
@end defvr
-@defvr Macro _ISOC2X_SOURCE
-@standards{C2X, (none)}
-If this macro is defined, ISO C2X extensions to ISO C11 are included.
+@defvr Macro _ISOC23_SOURCE
+@standards{C23, (none)}
+If this macro is defined, ISO C23 extensions to ISO C11 are included.
Only some features from this draft standard are supported by
-@theglibc{}.
+@theglibc{}. The older name @code{_ISOC2X_SOURCE} is also supported.
@end defvr
@defvr Macro __STDC_WANT_LIB_EXT2__
@defvr Macro __STDC_WANT_IEC_60559_EXT__
@standards{ISO, (none)}
-If you define this macro, ISO C2X features defined in Annex F of that
+If you define this macro, ISO C23 features defined in Annex F of that
standard are enabled. This affects declarations of the
@code{totalorder} functions and functions related to NaN payloads.
@end defvr
This chapter contains information about functions and macros for
determining the endianness of integer types and manipulating the bits
-of unsigned integers. These functions and macros are from ISO C2X and
+of unsigned integers. These functions and macros are from ISO C23 and
are declared in the header file @file{stdbit.h}.
The following macros describe the endianness of integer types. They
@deftypefunx {unsigned int} stdc_leading_zeros_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_leading_zeros_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_leading_zeros_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_leading_zeros} functions count the number of leading
(most significant) zero bits in @var{x}, starting from the most
@deftypefunx {unsigned int} stdc_leading_ones_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_leading_ones_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_leading_ones_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_leading_ones} functions count the number of leading
(most significant) one bits in @var{x}, starting from the most
@deftypefunx {unsigned int} stdc_trailing_zeros_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_trailing_zeros_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_trailing_zeros_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_trailing_zeros} functions count the number of trailing
(least significant) zero bits in @var{x}, starting from the least
@deftypefunx {unsigned int} stdc_trailing_ones_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_trailing_ones_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_trailing_ones_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_trailing_ones} functions count the number of trailing
(least significant) one bits in @var{x}, starting from the least
@deftypefunx {unsigned int} stdc_first_leading_zero_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_first_leading_zero_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_first_leading_zero_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_first_leading_zero} functions return the position of
the most significant zero bit in @var{x}, counting from the most
@deftypefunx {unsigned int} stdc_first_leading_one_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_first_leading_one_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_first_leading_one_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_first_leading_one} functions return the position of the
most significant one bit in @var{x}, counting from the most
@deftypefunx {unsigned int} stdc_first_trailing_zero_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_first_trailing_zero_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_first_trailing_zero_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_first_trailing_zero} functions return the position of
the least significant zero bit in @var{x}, counting from the least
@deftypefunx {unsigned int} stdc_first_trailing_one_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_first_trailing_one_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_first_trailing_one_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_first_trailing_one} functions return the position of
the least significant one bit in @var{x}, counting from the least
@deftypefunx {unsigned int} stdc_count_zeros_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_count_zeros_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_count_zeros_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_count_zeros} functions count the number of zero bits in
@var{x}.
@deftypefunx {unsigned int} stdc_count_ones_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_count_ones_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_count_ones_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_count_ones} functions count the number of one bits in
@var{x}.
@deftypefunx {_Bool} stdc_has_single_bit_ui (unsigned int @var{x})
@deftypefunx {_Bool} stdc_has_single_bit_ul (unsigned long int @var{x})
@deftypefunx {_Bool} stdc_has_single_bit_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_has_single_bit} functions return whether @var{x} has
exactly one bit set to one.
@deftypefunx {unsigned int} stdc_bit_width_ui (unsigned int @var{x})
@deftypefunx {unsigned int} stdc_bit_width_ul (unsigned long int @var{x})
@deftypefunx {unsigned int} stdc_bit_width_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_bit_width} functions return the minimum number of bits
needed to store @var{x}, not counting leading zero bits. If @var{x}
@deftypefunx {unsigned int} stdc_bit_floor_ui (unsigned int @var{x})
@deftypefunx {unsigned long int} stdc_bit_floor_ul (unsigned long int @var{x})
@deftypefunx {unsigned long long int} stdc_bit_floor_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_bit_floor} functions return the largest integer power
of two that is less than or equal to @var{x}. If @var{x} is zero,
@deftypefunx {unsigned int} stdc_bit_ceil_ui (unsigned int @var{x})
@deftypefunx {unsigned long int} stdc_bit_ceil_ul (unsigned long int @var{x})
@deftypefunx {unsigned long long int} stdc_bit_ceil_ull (unsigned long long int @var{x})
-@standards{C2X, stdbit.h}
+@standards{C23, stdbit.h}
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
The @code{stdc_bit_ceil} functions return the smallest integer power
of two that is greater than or equal to @var{x}. If this cannot be
@item @samp{%b}, @samp{%B}
Print an integer as an unsigned binary number. @samp{%b} uses
lower-case @samp{b} with the @samp{#} flag and @samp{%B} uses
-upper-case. @samp{%b} is an ISO C2X feature; @samp{%B} is an
-optional ISO C2X feature. @xref{Integer Conversions}, for
+upper-case. @samp{%b} is an ISO C23 feature; @samp{%B} is an
+optional ISO C23 feature. @xref{Integer Conversions}, for
details.
@item @samp{%o}
taking unsigned integers. If the type is narrower than @code{int},
the promoted argument is converted back to the specified type.
-This modifier was introduced in @w{ISO C2X}.
+This modifier was introduced in @w{ISO C23}.
@item wf@var{n}
Specifies that the argument is a @code{int_fast@var{n}_t} or
than @code{int}, the promoted argument is converted back to the
specified type.
-This modifier was introduced in @w{ISO C2X}.
+This modifier was introduced in @w{ISO C23}.
@item z
@itemx Z
@w{[@code{-}]@code{INF}} or @code{NAN} respectively if the conversion is
@samp{%A}, @samp{%E}, @samp{%F} or @samp{%G}. On some implementations, a NaN
may result in longer output with information about the payload of the
-NaN; ISO C2X defines a macro @code{_PRINTF_NAN_LEN_MAX} giving the
+NaN; ISO C23 defines a macro @code{_PRINTF_NAN_LEN_MAX} giving the
maximum length of such output.
The following flags can be used to modify the behavior:
@item @samp{%b}
Matches an unsigned integer written in binary radix. This is an ISO
-C2X feature. @xref{Numeric Input Conversions}.
+C23 feature. @xref{Numeric Input Conversions}.
@item @samp{%o}
Matches an unsigned integer written in octal radix.
@code{uint@var{n}_t *} or @code{uint_least@var{n}_t *} (which are the
same type).
-This modifier was introduced in @w{ISO C2X}.
+This modifier was introduced in @w{ISO C23}.
@item wf@var{n}
Specifies that the argument is an @code{int_fast@var{n}_t *} or
@code{uint_fast@var{n}_t *}.
-This modifier was introduced in @w{ISO C2X}.
+This modifier was introduced in @w{ISO C23}.
@item z
Specifies that the argument is a @code{size_t *}.
month names that is appropriate when the month is named by itself,
rather than the form that is appropriate when the month is used as
part of a complete date. The @code{%OB} and @code{%Ob} formats are a
-C2X feature, specified in C2X to use the locale's `alternative' month
+C23 feature, specified in C23 to use the locale's `alternative' month
name; @theglibc{} extends this specification to say that the form used
in a complete date is the default and the form naming the month by
itself is the alternative.
@item %b
The abbreviated month name according to the current locale, in the
grammatical form used when the month is part of a complete date.
-As a C2X feature (with a more detailed specification in @theglibc{}),
+As a C23 feature (with a more detailed specification in @theglibc{}),
the @code{O} modifier can be used (@code{%Ob}) to get the grammatical
form used when the month is named by itself.
@item %B
The full month name according to the current locale, in the
grammatical form used when the month is part of a complete date.
-As a C2X feature (with a more detailed specification in @theglibc{}),
+As a C23 feature (with a more detailed specification in @theglibc{}),
the @code{O} modifier can be used (@code{%OB}) to get the grammatical
form used when the month is named by itself.
/* Break VALUE into integral and fractional parts. */
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
-#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
/* Compute exponent to base ten. */
__MATHCALL_VEC (exp10,, (_Mdouble_ __x));
#endif
__MATHCALL (nexttoward,, (_Mdouble_ __x, long double __y));
# endif
-# if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
+# if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
/* Return X - epsilon. */
__MATHCALL (nextdown,, (_Mdouble_ __x));
/* Return X + epsilon. */
__MATHDECL (int,ilogb,, (_Mdouble_ __x));
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
/* Like ilogb, but returning long int. */
__MATHDECL (long int, llogb,, (_Mdouble_ __x));
#endif
/* Return positive difference between X and Y. */
__MATHCALL (fdim,, (_Mdouble_ __x, _Mdouble_ __y));
-# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC2X)
+# if !__MATH_DECLARING_FLOATN || defined __USE_GNU || !__GLIBC_USE (ISOC23)
/* Return maximum numeric value from X and Y. */
__MATHCALLX (fmax,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
__MATHCALL (fma,, (_Mdouble_ __x, _Mdouble_ __y, _Mdouble_ __z));
#endif /* Use ISO C99. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X) || __MATH_DECLARING_FLOATN
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23) || __MATH_DECLARING_FLOATN
/* Round X to nearest integer value, rounding halfway cases to even. */
__MATHCALLX (roundeven,, (_Mdouble_ __x), (__const__));
#if (__GLIBC_USE (IEC_60559_BFP_EXT) \
|| (__MATH_DECLARING_FLOATN \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X))))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23))))
/* Return value with maximum magnitude. */
__MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
__MATHCALLX (fminmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
#endif
-#if __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (ISOC23)
/* Return maximum value from X and Y. */
__MATHCALLX (fmaximum,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
/* Raise the supported exceptions represented by EXCEPTS. */
extern int feraiseexcept (int __excepts) __THROW;
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Set the supported exception flags represented by EXCEPTS, without
causing enabled traps to be taken. */
extern int fesetexcept (int __excepts) __THROW;
currently set. */
extern int fetestexcept (int __excepts) __THROW;
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Determine which of subset of the exceptions specified by EXCEPTS
are set in *FLAGP. */
extern int fetestexceptflag (const fexcept_t *__flagp, int __excepts) __THROW;
/* Control modes. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Store the current floating-point control modes in the object
pointed to by MODEP. */
extern int fegetmode (femode_t *__modep) __THROW;
/* NaN support. */
-#if (__GLIBC_USE (IEC_60559_BFP_EXT_C2X) \
+#if (__GLIBC_USE (IEC_60559_BFP_EXT_C23) \
&& defined FE_INVALID \
&& defined __SUPPORT_SNAN__)
# define FE_SNANS_ALWAYS_SIGNAL 1
# complex integer types, which are a GNU extension, but are currently
# disabled here because they do not work properly with tgmath.h).
-# C2x makes the <tgmath.h> rules for selecting a function to call
+# C23 makes the <tgmath.h> rules for selecting a function to call
# correspond to the usual arithmetic conversions (applied successively
# to the arguments for generic parameters in order), which choose the
# type whose set of values contains that of the other type (undefined
self.add_tests(prefix + fn, ret, ['r'] * args)
# TS 18661-4 functions.
self.add_tests('exp10', 'r', ['r'])
- # C2X functions.
+ # C23 functions.
self.add_tests('fmaximum', 'r', ['r', 'r'])
self.add_tests('fmaximum_mag', 'r', ['r', 'r'])
self.add_tests('fmaximum_num', 'r', ['r', 'r'])
TEST_ff_f (pow, 0, plus_infty, 0, ERRNO_UNCHANGED),
TEST_ff_f (pow, minus_zero, plus_infty, 0, ERRNO_UNCHANGED),
/* C99 erroneously specified a divide-by-zero exception here,
- which is not permitted in C2x (C11 specified it as optional).
+ which is not permitted in C23 (C11 specified it as optional).
See <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1515.pdf>
and
<http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2271.pdf>. */
#endif
#if (__HAVE_FLOAT16 \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF16 (__builtin_nansf16 (""))
#endif
#if (__HAVE_FLOAT32 \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF32 (__builtin_nansf32 (""))
#endif
#if (__HAVE_FLOAT64 \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF64 (__builtin_nansf64 (""))
#endif
#if (__HAVE_FLOAT128 \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF128 (__builtin_nansf128 (""))
#endif
#if (__HAVE_FLOAT32X \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF32X (__builtin_nansf32x (""))
#endif
#if (__HAVE_FLOAT64X \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF64X (__builtin_nansf64x (""))
#endif
#if (__HAVE_FLOAT128X \
&& __GLIBC_USE (IEC_60559_TYPES_EXT) \
- && (defined __USE_GNU || !__GLIBC_USE (ISOC2X)))
+ && (defined __USE_GNU || !__GLIBC_USE (ISOC23)))
# define SNANF128X (__builtin_nansf128x (""))
#endif
# define FP_ILOGBNAN 2147483647
# endif
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# if __WORDSIZE == 32
# define __FP_LONG_MAX 0x7fffffffL
# else
#include <bits/fp-fast.h>
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Rounding direction macros for fromfp functions. */
enum
{
#define __MATHCALL_NARROW(func, redir, nargs) \
__MATHCALL_NARROW_NORMAL (func, nargs)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# define _Mret_ float
# define _Marg_ double
#endif /* Use ISO C99. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# include <bits/iscanonical.h>
/* Return nonzero value if X is a signaling NaN. */
# endif
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* An expression whose type has the widest of the evaluation formats
of X and Y (which are of floating-point types). */
# if __FLT_EVAL_METHOD__ == 2 || __FLT_EVAL_METHOD__ > 64
versions before GCC 13 have __builtin_tgmath semantics that, when
integer arguments are passed to narrowing macros returning
_Float32x, or non-narrowing macros with at least two generic
- arguments, do not always correspond to the C2X semantics, so more
+ arguments, do not always correspond to the C23 semantics, so more
complicated macro definitions are also used in some cases for
versions from GCC 8 to GCC 12. */
#define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0)
-#define __HAVE_BUILTIN_TGMATH_C2X __GNUC_PREREQ (13, 0)
+#define __HAVE_BUILTIN_TGMATH_C23 __GNUC_PREREQ (13, 0)
#if __GNUC_PREREQ (2, 7)
__builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y))
# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
__builtin_tgmath (__TGMATH_NARROW_FUNCS_F64 (F) (X), (Y), (Z))
-# if __HAVE_FLOAT128 && __HAVE_BUILTIN_TGMATH_C2X
+# if __HAVE_FLOAT128 && __HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_1_NARROW_F32X(F, X) \
__builtin_tgmath (__TGMATH_NARROW_FUNCS_F32X (F) (X))
# define __TGMATH_2_NARROW_F32X(F, X, Y) \
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# ifdef __NO_LONG_DOUBLE_MATH
# define __tgml(fct) fct
# else
__complex_integer_type (__typeof__ (+(expr))))
/* The tgmath real type of EXPR1 combined with EXPR2, without handling
- the C2X rule of interpreting integer arguments as _Float32x if any
+ the C23 rule of interpreting integer arguments as _Float32x if any
argument is _FloatNx. */
# define __tgmath_real_type2_base(expr1, expr2) \
__typeof ((__tgmath_real_type (expr1)) 0 + (__tgmath_real_type (expr2)) 0)
/* The tgmath complex type of EXPR1 combined with EXPR2, without
- handling the C2X rule of interpreting integer arguments as
+ handling the C23 rule of interpreting integer arguments as
_Float32x if any argument is _FloatNx. */
# define __tgmath_complex_type2_base(expr1, expr2) \
__typeof ((__tgmath_complex_type (expr1)) 0 \
+ (__tgmath_complex_type (expr2)) 0)
/* The tgmath real type of EXPR1 combined with EXPR2 and EXPR3,
- without handling the C2X rule of interpreting integer arguments as
+ without handling the C23 rule of interpreting integer arguments as
_Float32x if any argument is _FloatNx. */
# define __tgmath_real_type3_base(expr1, expr2, expr3) \
__typeof ((__tgmath_real_type (expr1)) 0 \
# define __TGMATH_CF128(arg_comb, fct, cfct, arg_call) /* Nothing. */
# endif
-# endif /* !__HAVE_BUILTIN_TGMATH_C2X. */
+# endif /* !__HAVE_BUILTIN_TGMATH_C23. */
/* We have two kinds of generic macros: to support functions which are
only defined on real valued parameters and those which are defined
__TGMATH_2 (Fct, (Val1), (Val2))
# define __TGMATH_BINARY_FIRST_REAL_STD_ONLY(Val1, Val2, Fct) \
__TGMATH_2STD (Fct, (Val1), (Val2))
-# if __HAVE_BUILTIN_TGMATH_C2X
+# if __HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
__TGMATH_2 (Fct, (Val1), (Val2))
# endif
# define __TGMATH_BINARY_REAL_STD_ONLY(Val1, Val2, Fct) \
__TGMATH_2STD (Fct, (Val1), (Val2))
-# if __HAVE_BUILTIN_TGMATH_C2X
+# if __HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
__TGMATH_3 (Fct, (Val1), (Val2), (Val3))
# define __TGMATH_TERNARY_REAL_ONLY(Val1, Val2, Val3, Fct) \
__TGMATH_1C (Fct, Cfct, (Val))
# define __TGMATH_UNARY_REAL_IMAG_RET_REAL_SAME(Val, Cfct) \
__TGMATH_1 (Cfct, (Val))
-# if __HAVE_BUILTIN_TGMATH_C2X
+# if __HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
__TGMATH_2C (Fct, Cfct, (Val1), (Val2))
# endif
: (__tgmath_real_type (Val1)) __tgml(Fct) (Val1, Val2)))
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
(__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
Fct##f (Val1, Val2)))
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY(Val1, Val2, Val3, Fct) \
(__extension__ ((sizeof ((Val1) + (Val2)) > sizeof (double) \
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
__TGMATH_UNARY_REAL_IMAG_RET_REAL ((Val), Cfct, Cfct)
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
/* XXX This definition has to be changed as soon as the compiler understands
the imaginary keyword. */
# define __TGMATH_BINARY_REAL_IMAG(Val1, Val2, Fct, Cfct) \
distinguished using sizeof (or at all if the types are typedefs
rather than different types, in which case we err on the side of
using the wider type if unsure). */
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# if __HAVE_FLOATN_NOT_TYPEDEF
# define __TGMATH_NARROW_F32X_USE_F64X(X) \
!__builtin_types_compatible_p (__typeof (+(X)), _Float64)
F ## f64x (X, Y, Z) \
: F ## f128 (X, Y, Z)))
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_1_NARROW_F32X(F, X) \
(__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float64) \
|| __TGMATH_NARROW_F32X_USE_F64X (X) \
# define __TGMATH_3_NARROW_F64(F, X, Y, Z) \
(F ## f128 (X, Y, Z))
# endif
-# if !__HAVE_BUILTIN_TGMATH_C2X
+# if !__HAVE_BUILTIN_TGMATH_C23
# define __TGMATH_1_NARROW_F32X(F, X) \
(__extension__ (sizeof ((__tgmath_real_type (X)) 0) > sizeof (_Float32x) \
|| __TGMATH_NARROW_F32X_USE_F64X (X) \
/* Compute base-2 logarithm of X. */
#define log2(Val) __TGMATH_UNARY_REAL_ONLY (Val, log2)
-#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_FUNCS_EXT_C23)
/* Compute exponent to base ten. */
#define exp10(Val) __TGMATH_UNARY_REAL_ONLY (Val, exp10)
#endif
prevailing rounding mode. */
#define rint(Val) __TGMATH_UNARY_REAL_ONLY (Val, rint)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Return X - epsilon. */
# define nextdown(Val) __TGMATH_UNARY_REAL_ONLY (Val, nextdown)
/* Return X + epsilon. */
/* Return positive difference between X and Y. */
#define fdim(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fdim)
-#if __GLIBC_USE (ISOC2X) && !defined __USE_GNU
+#if __GLIBC_USE (ISOC23) && !defined __USE_GNU
/* Return maximum numeric value from X and Y. */
# define fmax(Val1, Val2) __TGMATH_BINARY_REAL_STD_ONLY (Val1, Val2, fmax)
#define fma(Val1, Val2, Val3) \
__TGMATH_TERNARY_REAL_ONLY (Val1, Val2, Val3, fma)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Round X to nearest integer value, rounding halfway cases to even. */
# define roundeven(Val) __TGMATH_UNARY_REAL_ONLY (Val, roundeven)
# define fminmag(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fminmag)
#endif
-#if __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (ISOC23)
/* Return maximum value from X and Y. */
# define fmaximum(Val1, Val2) __TGMATH_BINARY_REAL_ONLY (Val1, Val2, fmaximum)
/* Narrowing functions. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Add. */
# define fadd(Val1, Val2) __TGMATH_2_NARROW_F (fadd, Val1, Val2)
-/* Test inet_addr does not accept C2X binary constants.
+/* Test inet_addr does not accept C23 binary constants.
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
CFLAGS-tst-memstream-string.c += -fno-builtin-fprintf
-# Some versions of GCC supported for building glibc do not support -std=c2x, so
-# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# Some versions of GCC supported for building glibc do not support -std=c23
+# (added in GCC 14), or the older name -std=c2x (added in GCC 9), so
+# the test for that version uses -std=c11 and then _ISOC23_SOURCE is defined in
# the test as needed.
CFLAGS-tst-scanf-binary-c11.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-scanf-binary-c2x.c += -std=c11 -DOBJPFX=\"$(objpfx)\"
-/* Test scanf functions with C2X binary integers (narrow strings,
+/* Test scanf functions with C23 binary integers (narrow strings,
no extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR char
#define FNW
#define L_(C) C
-#define TEST_C2X 0
+#define TEST_C23 0
#define STD "c11"
#include <tst-scanf-binary-main.c>
-/* Test scanf functions with C2X binary integers (narrow strings,
+/* Test scanf functions with C23 binary integers (narrow strings,
no extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
<https://www.gnu.org/licenses/>. */
/* Some versions of GCC supported for building glibc do not support
- -std=c2x. */
+ -std=c23 or -std=c2x. */
#undef _GNU_SOURCE
-#define _ISOC2X_SOURCE
+#define _ISOC23_SOURCE
#define CHAR char
#define FNW
#define L_(C) C
-#define TEST_C2X 1
-#define STD "c2x"
+#define TEST_C23 1
+#define STD "c23"
#include <tst-scanf-binary-main.c>
-/* Test scanf functions with C2X binary integers (narrow strings,
+/* Test scanf functions with C23 binary integers (narrow strings,
GNU extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR char
#define FNW
#define L_(C) C
-#define TEST_C2X 1
+#define TEST_C23 1
#define STD "gnu11"
#include <tst-scanf-binary-main.c>
-/* Test scanf functions with C2X binary integers (narrow strings,
+/* Test scanf functions with C23 binary integers (narrow strings,
GNU extensions to C89).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR char
#define FNW
#define L_(C) C
-#define TEST_C2X 0
+#define TEST_C23 0
#define STD "gnu89"
#include <tst-scanf-binary-main.c>
-/* Test scanf functions with C2X binary integers.
+/* Test scanf functions with C23 binary integers.
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
TEST_VERIFY_EXIT (0 <= ret);
xfclose (fp);
- if (!TEST_C2X)
+ if (!TEST_C23)
{
expected = 0;
expected_c = s[0] == L_('-') ? s[2] : s[1];
static void
one_check_scnb (const CHAR *s, int expected, char expected_c)
{
-#if TEST_C2X || defined _GNU_SOURCE
+#if TEST_C23 || defined _GNU_SOURCE
CHECK_SCNB (uint8_t, SCNb8, s, (uint8_t) expected, expected_c);
CHECK_SCNB (uint16_t, SCNb16, s, (uint16_t) expected, expected_c);
CHECK_SCNB (uint32_t, SCNb32, s, (uint32_t) expected, expected_c);
CFLAGS-testmb.c += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Werror
-# Some versions of GCC supported for building glibc do not support -std=c2x
-# or -std=gnu2x, so the tests for those versions use -std=c11 and -std=gnu11
-# and then _ISOC2X_SOURCE is defined in the test as needed.
+# Some versions of GCC supported for building glibc do not support -std=c23
+# or -std=gnu23 (added in GCC 14), or the older names -std=c2x or -std=gnu2x
+# (added in GCC 9), so the tests for those versions use -std=c11 and -std=gnu11
+# and then _ISOC23_SOURCE is defined in the test as needed.
CFLAGS-tst-strtol-binary-c11.c += -std=c11
CFLAGS-tst-strtol-binary-c2x.c += -std=c11
CFLAGS-tst-strtol-binary-gnu11.c += -std=gnu11
# endif
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# ifdef __LDBL_COMPAT
__LDBL_REDIR1_DECL (strfroml, strfromd)
# else
# define PRIXPTR __PRIPTR_PREFIX "X"
/* Binary notation. */
-# if __GLIBC_USE (ISOC2X)
+# if __GLIBC_USE (ISOC23)
# define PRIb8 "b"
# define PRIb16 "b"
# define PRIb32 "b"
/* Binary notation. */
-# if __GLIBC_USE (ISOC2X)
+# if __GLIBC_USE (ISOC23)
# define SCNb8 "hhb"
# define SCNb16 "hb"
# define SCNb32 "b"
/* Versions of the above functions that handle '0b' and '0B' prefixes
in base 0 or 2. */
-#if __GLIBC_USE (C2X_STRTOL)
+#if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern intmax_t __REDIRECT_NTH (strtoimax, (const char *__restrict __nptr,
char **__restrict __endptr,
# define UINTMAX_C(c) c ## ULL
# endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
# define INT8_WIDTH 8
# define UINT8_WIDTH 8
/* Versions of the above functions that handle '0b' and '0B' prefixes
in base 0 or 2. */
-#if __GLIBC_USE (C2X_STRTOL)
+#if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern long int __REDIRECT_NTH (strtol, (const char *__restrict __nptr,
char **__restrict __endptr,
#endif
/* Convert a floating-point number to a string. */
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
extern int strfromd (char *__dest, size_t __size, const char *__format,
double __f)
__THROW __nonnull ((3));
/* Versions of the above functions that handle '0b' and '0B' prefixes
in base 0 or 2. */
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern long int __REDIRECT_NTH (strtol_l, (const char *__restrict __nptr,
char **__restrict __endptr,
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#include <stdlib.h>
#include <wchar.h>
#include <locale/localeinfo.h>
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#if HAVE_CONFIG_H
# include <config.h>
#define QUAD 1
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#include <locale.h>
#include <stdbool.h>
#define UNSIGNED 1
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#include <locale.h>
#include <stdbool.h>
#define UNSIGNED 1
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#include <locale.h>
#include <stdbool.h>
-/* Test strtol functions with C2X binary integers (narrow strings,
+/* Test strtol functions with C23 binary integers (narrow strings,
no extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define WIDE 0
#define FNPFX strto
#define L_(C) C
-#define TEST_C2X 0
+#define TEST_C23 0
#define TEST_Q 0
#define TEST_LOCALE 0
-/* Test strtol functions with C2X binary integers (narrow strings,
+/* Test strtol functions with C23 binary integers (narrow strings,
no extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
<https://www.gnu.org/licenses/>. */
/* Some versions of GCC supported for building glibc do not support
- -std=c2x. */
+ -std=c23 or -std=c2x. */
#undef _GNU_SOURCE
-#define _ISOC2X_SOURCE
+#define _ISOC23_SOURCE
#define CHAR char
#define WIDE 0
#define FNPFX strto
#define L_(C) C
-#define TEST_C2X 1
+#define TEST_C23 1
#define TEST_Q 0
#define TEST_LOCALE 0
-/* Test strtol functions with C2X binary integers (narrow strings, GNU
- extensions, C2X strtol features disabled).
+/* Test strtol functions with C23 binary integers (narrow strings, GNU
+ extensions, C23 strtol features disabled).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#include <features.h>
/* This file tests the old versions of GNU extension functions, which
are not normally available to new binaries because GNU extensions
- normally imply C2X strtol features. */
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+ normally imply C23 strtol features. */
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define CHAR char
#define WIDE 0
#define FNPFX strto
#define L_(C) C
-#define TEST_C2X 0
+#define TEST_C23 0
#define TEST_Q 1
#define TEST_LOCALE 1
-/* Test strtol functions with C2X binary integers (narrow strings, GNU
+/* Test strtol functions with C23 binary integers (narrow strings, GNU
extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define WIDE 0
#define FNPFX strto
#define L_(C) C
-#define TEST_C2X 1
+#define TEST_C23 1
#define TEST_Q 1
#define TEST_LOCALE 1
-/* Test strtol functions with C2X binary integers.
+/* Test strtol functions with C23 binary integers.
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHECK_RES(ARG, RES, EP, EXPECTED, EXPECTED_EP) \
do \
{ \
- if (TEST_C2X) \
+ if (TEST_C23) \
{ \
TEST_COMPARE ((RES), EXPECTED); \
TEST_VERIFY ((EP) == EXPECTED_EP); \
/* Copy no more than N bytes of SRC to DEST, stopping when C is found.
Return the position in DEST one byte past where C was copied,
or NULL if C was not found in the first N bytes of SRC. */
-#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC2X)
+#if defined __USE_MISC || defined __USE_XOPEN || __GLIBC_USE (ISOC23)
extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
int __c, size_t __n)
__THROW __nonnull ((1, 2)) __attr_access ((__write_only__, 1, 4));
#endif
#if (defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K8 \
- || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X))
+ || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23))
/* Duplicate S, returning an identical malloc'd string. */
extern char *strdup (const char *__s)
__THROW __attribute_malloc__ __nonnull ((1));
/* Return a malloc'd copy of at most N bytes of STRING. The
resultant string is terminated even if no null terminator
appears before STRING[N]. */
-#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC2X)
+#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2) || __GLIBC_USE (ISOC23)
extern char *strndup (const char *__string, size_t __n)
__THROW __attribute_malloc__ __nonnull ((1));
#endif
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
extern unsigned long int __ieee_get_fp_control (void) __THROW;
extern void __ieee_set_fp_control (unsigned long int __value) __THROW;
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned long int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
tst-ieee128-scanf-binary-gnu11 \
tst-ieee128-scanf-binary-gnu89
-# Some versions of GCC supported for building glibc do not support -std=c2x, so
-# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# Some versions of GCC supported for building glibc do not support -std=c23
+# (added in GCC 14), or the older name -std=c2x (added in GCC 9), so
+# the test for that version uses -std=c11 and then _ISOC23_SOURCE is defined in
# the test as needed.
CFLAGS-tst-ibm128-scanf-binary-c11.c += -mabi=ibmlongdouble -Wno-psabi \
-std=c11 -DOBJPFX=\"$(objpfx)\"
tst-ieee128-wscanf-binary-gnu11 \
tst-ieee128-wscanf-binary-gnu89
-# Some versions of GCC supported for building glibc do not support -std=c2x, so
-# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# Some versions of GCC supported for building glibc do not support -std=c23
+# (added in GCC 14), or the older name -std=c2x (added in GCC 9), so
+# the test for that version uses -std=c11 and then _ISOC23_SOURCE is defined in
# the test as needed.
CFLAGS-tst-ibm128-wscanf-binary-c11.c += -mabi=ibmlongdouble -Wno-psabi \
-std=c11 -DOBJPFX=\"$(objpfx)\"
tst-nldbl-scanf-binary-gnu11 \
tst-nldbl-scanf-binary-gnu89
-# Some versions of GCC supported for building glibc do not support -std=c2x, so
-# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# Some versions of GCC supported for building glibc do not support -std=c23
+# (added in GCC 14), or the older name -std=c2x (added in GCC 9), so
+# the test for that version uses -std=c11 and then _ISOC23_SOURCE is defined in
# the test as needed.
CFLAGS-tst-nldbl-scanf-binary-c11.c += -mlong-double-64 -std=c11 \
-DOBJPFX=\"$(objpfx)\"
tst-nldbl-wscanf-binary-gnu11 \
tst-nldbl-wscanf-binary-gnu89
-# Some versions of GCC supported for building glibc do not support -std=c2x, so
-# the test for that version uses -std=c11 and then _ISOC2X_SOURCE is defined in
+# Some versions of GCC supported for building glibc do not support -std=c23
+# (added in GCC 14), or the older name -std=c2x (added in GCC 9), so
+# the test for that version uses -std=c11 and then _ISOC23_SOURCE is defined in
# the test as needed.
CFLAGS-tst-nldbl-wscanf-binary-c11.c += -mlong-double-64 -std=c11 \
-DOBJPFX=\"$(objpfx)\"
#define FE_NOMASK_ENV ((const fenv_t *) -257)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((const fenv_t *) -1l)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((const fenv_t *) -1)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef double femode_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((__const fenv_t *) -1)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
/* If the default argument is used we use this value. */
#define FE_DFL_ENV ((const fenv_t *) -1)
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef unsigned long int femode_t;
# define FE_NOMASK_ENV ((const fenv_t *) -2)
#endif
-#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C23)
/* Type representing floating-point control modes. */
typedef struct
{
#endif
-#if defined __USE_POSIX || __GLIBC_USE (ISOC2X)
+#if defined __USE_POSIX || __GLIBC_USE (ISOC23)
# ifndef __USE_TIME_BITS64
/* Return the `struct tm' representation of *TIMER in UTC,
using *TP to store the result. */
# define localtime_r __localtime_r
# endif
# endif
-#endif /* POSIX || C2X */
+#endif /* POSIX || C23 */
/* Return a string of the form "Day Mon dd hh:mm:ss yyyy\n"
that is the representation of TP in this format. */
((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
-#if defined __USE_MISC || __GLIBC_USE (ISOC2X)
+#if defined __USE_MISC || __GLIBC_USE (ISOC23)
# ifndef __USE_TIME_BITS64
/* Like `mktime', but for TP represents Universal Time, not local time. */
extern time_t timegm (struct tm *__tp) __THROW;
#endif
-#if __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (ISOC23)
# ifndef __USE_TIME_BITS64
/* Set TS to resolution of time base BASE. */
extern int timespec_getres (struct timespec *__ts, int __base)
$(objpfx)tst-wcstod-nan-locale: $(libm)
$(objpfx)tst-wcstod-nan-sign: $(libm)
-# Some versions of GCC supported for building glibc do not support -std=c2x
-# or -std=gnu2x, so the tests for those versions use -std=c11 and -std=gnu11
-# and then _ISOC2X_SOURCE is defined in the test as needed.
+# Some versions of GCC supported for building glibc do not support -std=c23
+# or -std=gnu23 (added in GCC 14), or the older names -std=c2x or -std=gnu2x
+# (added in GCC 9), so the tests for those versions use -std=c11 and -std=gnu11
+# and then _ISOC23_SOURCE is defined in the test as needed.
CFLAGS-tst-wcstol-binary-c11.c += -std=c11
CFLAGS-tst-wcstol-binary-c2x.c += -std=c11
CFLAGS-tst-wcstol-binary-gnu11.c += -std=gnu11
__LDBL_REDIR_DECL (vswprintf);
# if !__GLIBC_USE (DEPRECATED_SCANF)
# if defined __LDBL_COMPAT
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (fwscanf, __nldbl___isoc23_fwscanf)
__LDBL_REDIR1_DECL (wscanf, __nldbl___isoc23_wscanf)
__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc23_swscanf)
__LDBL_REDIR1_DECL (swscanf, __nldbl___isoc99_swscanf)
# endif
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (fwscanf, __isoc23_fwscanfieee128)
__LDBL_REDIR1_DECL (wscanf, __isoc23_wscanfieee128)
__LDBL_REDIR1_DECL (swscanf, __isoc23_swscanfieee128)
# endif
# if !__GLIBC_USE (DEPRECATED_SCANF)
# if defined __LDBL_COMPAT
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (vfwscanf, __nldbl___isoc23_vfwscanf)
__LDBL_REDIR1_DECL (vwscanf, __nldbl___isoc23_vwscanf)
__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc23_vswscanf)
__LDBL_REDIR1_DECL (vswscanf, __nldbl___isoc99_vswscanf)
# endif
# elif __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
__LDBL_REDIR1_DECL (vfwscanf, __isoc23_vfwscanfieee128)
__LDBL_REDIR1_DECL (vwscanf, __isoc23_vwscanfieee128)
__LDBL_REDIR1_DECL (vswscanf, __isoc23_vswscanfieee128)
-/* Test wcstol functions with C2X binary integers (wide strings,
+/* Test wcstol functions with C23 binary integers (wide strings,
no extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define WIDE 1
#define FNPFX wcsto
#define L_(C) L ## C
-#define TEST_C2X 0
+#define TEST_C23 0
#define TEST_Q 0
#define TEST_LOCALE 0
-/* Test wcstol functions with C2X binary integers (wide strings,
+/* Test wcstol functions with C23 binary integers (wide strings,
no extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
<https://www.gnu.org/licenses/>. */
/* Some versions of GCC supported for building glibc do not support
- -std=c2x. */
+ -std=c23 or -std-c2x. */
#undef _GNU_SOURCE
-#define _ISOC2X_SOURCE
+#define _ISOC23_SOURCE
#define CHAR wchar_t
#define WIDE 1
#define FNPFX wcsto
#define L_(C) L ## C
-#define TEST_C2X 1
+#define TEST_C23 1
#define TEST_Q 0
#define TEST_LOCALE 0
-/* Test wcstol functions with C2X binary integers (wide strings, GNU
- extensions, C2X wcstol features disabled).
+/* Test wcstol functions with C23 binary integers (wide strings, GNU
+ extensions, C23 wcstol features disabled).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#include <features.h>
/* This file tests the old versions of GNU extension functions, which
are not normally available to new binaries because GNU extensions
- normally imply C2X wcstol features. */
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+ normally imply C23 wcstol features. */
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define CHAR wchar_t
#define WIDE 1
#define FNPFX wcsto
#define L_(C) L ## C
-#define TEST_C2X 0
+#define TEST_C23 0
#define TEST_Q 1
#define TEST_LOCALE 1
-/* Test wcstol functions with C2X binary integers (wide strings, GNU
+/* Test wcstol functions with C23 binary integers (wide strings, GNU
extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define WIDE 1
#define FNPFX wcsto
#define L_(C) L ## C
-#define TEST_C2X 1
+#define TEST_C23 1
#define TEST_Q 1
#define TEST_LOCALE 1
-/* Test wscanf functions with C2X binary integers (wide strings,
+/* Test wscanf functions with C23 binary integers (wide strings,
no extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR wchar_t
#define FNW w
#define L_(C) L ## C
-#define TEST_C2X 0
+#define TEST_C23 0
#define STD "c11"
#include "../stdio-common/tst-scanf-binary-main.c"
-/* Test wscanf functions with C2X binary integers (wide strings,
+/* Test wscanf functions with C23 binary integers (wide strings,
no extensions).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
<https://www.gnu.org/licenses/>. */
/* Some versions of GCC supported for building glibc do not support
- -std=c2x. */
+ -std=c23 or -std=c2x. */
#undef _GNU_SOURCE
-#define _ISOC2X_SOURCE
+#define _ISOC23_SOURCE
#define CHAR wchar_t
#define FNW w
#define L_(C) L ## C
-#define TEST_C2X 1
-#define STD "c2x"
+#define TEST_C23 1
+#define STD "c23"
#include "../stdio-common/tst-scanf-binary-main.c"
-/* Test wscanf functions with C2X binary integers (wide strings,
+/* Test wscanf functions with C23 binary integers (wide strings,
GNU extensions to C11).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR wchar_t
#define FNW w
#define L_(C) L ## C
-#define TEST_C2X 1
+#define TEST_C23 1
#define STD "gnu11"
#include "../stdio-common/tst-scanf-binary-main.c"
-/* Test wscanf functions with C2X binary integers (wide strings,
+/* Test wscanf functions with C23 binary integers (wide strings,
GNU extensions to C89).
Copyright (C) 2022-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
#define CHAR wchar_t
#define FNW w
#define L_(C) L ## C
-#define TEST_C2X 0
+#define TEST_C23 0
#define STD "gnu89"
#include "../stdio-common/tst-scanf-binary-main.c"
#include <bits/types.h>
#include <bits/types/mbstate_t.h>
-/* Declare the C2x char8_t typedef in C2x modes, but only if the C++
+/* Declare the C23 char8_t typedef in C23 modes, but only if the C++
__cpp_char8_t feature test macro is not defined. */
-#if __GLIBC_USE (ISOC2X) && !defined __cpp_char8_t
+#if __GLIBC_USE (ISOC23) && !defined __cpp_char8_t
#if __GNUC_PREREQ (10, 0) && defined __cplusplus
/* Suppress the diagnostic regarding char8_t being a keyword in C++20. */
# pragma GCC diagnostic push
__BEGIN_DECLS
-/* Declare the C2x mbrtoc8() and c8rtomb() functions in C2x modes or if
+/* Declare the C23 mbrtoc8() and c8rtomb() functions in C23 modes or if
the C++ __cpp_char8_t feature test macro is defined. */
-#if __GLIBC_USE (ISOC2X) || defined __cpp_char8_t
+#if __GLIBC_USE (ISOC23) || defined __cpp_char8_t
/* Write char8_t representation of multibyte character pointed
to by S to PC8. */
extern size_t mbrtoc8 (char8_t *__restrict __pc8,
wchar_t **__restrict __endptr) __THROW;
#endif /* C99 */
-#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X)
+#if __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC23)
/* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */
# if __HAVE_FLOAT16
extern _Float128x wcstof128x (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
# endif
-#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC2X) */
+#endif /* __GLIBC_USE (IEC_60559_TYPES_EXT) && __GLIBC_USE (ISOC23) */
/* Convert initial portion of wide string NPTR to `long int'
/* Versions of the above functions that handle '0b' and '0B' prefixes
in base 0 or 2. */
-#if __GLIBC_USE (C2X_STRTOL)
+#if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern long int __REDIRECT_NTH (wcstol, (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
/* Versions of the above functions that handle '0b' and '0B' prefixes
in base 0 or 2. */
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern long int __REDIRECT_NTH (wcstol_l, (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
bits/wchar-ldbl.h. */
# if !__GLIBC_USE (DEPRECATED_SCANF) && !defined __LDBL_COMPAT \
&& __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
const wchar_t *__restrict __format, ...),
&& (!defined __LDBL_COMPAT || !defined __REDIRECT) \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K) \
&& __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 0
-# if __GLIBC_USE (C2X_STRTOL)
+# if __GLIBC_USE (C23_STRTOL)
# ifdef __REDIRECT
extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
const wchar_t *__restrict __format,
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define __need_wchar_t
#include <stddef.h>
#include <locale.h>
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define __need_wchar_t
#include <stddef.h>
#include <locale.h>
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define __need_wchar_t
#include <stddef.h>
#include <locale.h>
<https://www.gnu.org/licenses/>. */
#include <features.h>
-#undef __GLIBC_USE_C2X_STRTOL
-#define __GLIBC_USE_C2X_STRTOL 0
+#undef __GLIBC_USE_C23_STRTOL
+#define __GLIBC_USE_C23_STRTOL 0
#define __need_wchar_t
#include <stddef.h>
#include <locale.h>