@@ -89,9 +89,12 @@ extern "C" {
8989 * _ISOC11_SOURCE or gcc -std=c11 or g++ -std=c++11
9090 * ISO C11
9191 *
92- * _ISOC2x_SOURCE or gcc -std=c2x or g++ -std=c++20
92+ * _ISOC2x_SOURCE or gcc -std=c2x or -std=c23 or g++ -std=c++20
9393 * ISO C11
9494 *
95+ * _ISOC23_SOURCE or gcc -std=c2x or -std=c2x or g++ -std=c++20
96+ * ISO C23
97+ *
9598 * _ATFILE_SOURCE (implied by _POSIX_C_SOURCE >= 200809L)
9699 * "at" functions
97100 *
@@ -122,8 +125,8 @@ extern "C" {
122125#define _ISOC99_SOURCE 1
123126#undef _ISOC11_SOURCE
124127#define _ISOC11_SOURCE 1
125- #undef _ISOC2X_SOURCE
126- #define _ISOC2X_SOURCE 1
128+ #undef _ISOC23_SOURCE
129+ #define _ISOC23_SOURCE 1
127130#undef _POSIX_SOURCE
128131#define _POSIX_SOURCE 1
129132#undef _POSIX_C_SOURCE
@@ -255,10 +258,10 @@ extern "C" {
255258 * g++ -std=c++11 or newer (on by default since GCC 6), or with
256259 * _ISOC11_SOURCE.
257260 *
258- * __ISO_C_VISIBLE >= 2020
259- * ISO C2x ; enabled with gcc -std=c2x or newer,
261+ * __ISO_C_VISIBLE >= 2023
262+ * ISO C23 ; enabled with gcc -std=c23 or -std=c2x or newer,
260263 * g++ -std=c++20 or newer, or with
261- * _ISOC2X_SOURCE.
264+ * _ISOC2X_SOURCE or _ISOC23_SOURCE .
262265 *
263266 * __ATFILE_VISIBLE
264267 * "at" functions; enabled by default, with _ATFILE_SOURCE,
@@ -318,9 +321,15 @@ extern "C" {
318321#define __ZEPHYR_VISIBLE 0
319322#endif
320323
321- #if defined(_ISOC2X_SOURCE ) || \
324+ #ifdef _ISOC2X_SOURCE
325+ #undef _ISOC2X_SOURCE
326+ #undef _ISOC23_SOURCE
327+ #define _ISOC23_SOURCE 1
328+ #endif
329+
330+ #if defined(_ISOC23_SOURCE ) || \
322331 (__STDC_VERSION__ - 0 ) > 201710L || (__cplusplus - 0 ) >= 202002L
323- #define __ISO_C_VISIBLE 2020
332+ #define __ISO_C_VISIBLE 2023
324333#elif defined(_ISOC11_SOURCE ) || \
325334 (__STDC_VERSION__ - 0 ) >= 201112L || (__cplusplus - 0 ) >= 201103L
326335#define __ISO_C_VISIBLE 2011
0 commit comments