about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/Makefile5
-rw-r--r--stdio-common/tst-scanf-binary-c11.c4
-rw-r--r--stdio-common/tst-scanf-binary-c2x.c10
-rw-r--r--stdio-common/tst-scanf-binary-gnu11.c4
-rw-r--r--stdio-common/tst-scanf-binary-gnu89.c4
-rw-r--r--stdio-common/tst-scanf-binary-main.c6
6 files changed, 17 insertions, 16 deletions
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index e312565f3b..60a7f4cff3 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -490,8 +490,9 @@ CFLAGS-tst-bz11319-fortify2.c += $(no-fortify-source),-D_FORTIFY_SOURCE=2
 
 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)\"
diff --git a/stdio-common/tst-scanf-binary-c11.c b/stdio-common/tst-scanf-binary-c11.c
index b8713aeb42..1d24f2eb29 100644
--- a/stdio-common/tst-scanf-binary-c11.c
+++ b/stdio-common/tst-scanf-binary-c11.c
@@ -1,4 +1,4 @@
-/* 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.
@@ -22,7 +22,7 @@
 #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>
diff --git a/stdio-common/tst-scanf-binary-c2x.c b/stdio-common/tst-scanf-binary-c2x.c
index 1b1175fcb9..ebb9f04937 100644
--- a/stdio-common/tst-scanf-binary-c2x.c
+++ b/stdio-common/tst-scanf-binary-c2x.c
@@ -1,4 +1,4 @@
-/* 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.
@@ -18,14 +18,14 @@
    <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>
diff --git a/stdio-common/tst-scanf-binary-gnu11.c b/stdio-common/tst-scanf-binary-gnu11.c
index 433b7de34c..4524b7cda8 100644
--- a/stdio-common/tst-scanf-binary-gnu11.c
+++ b/stdio-common/tst-scanf-binary-gnu11.c
@@ -1,4 +1,4 @@
-/* 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.
@@ -20,7 +20,7 @@
 #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>
diff --git a/stdio-common/tst-scanf-binary-gnu89.c b/stdio-common/tst-scanf-binary-gnu89.c
index 61bb60c717..0a209b37c1 100644
--- a/stdio-common/tst-scanf-binary-gnu89.c
+++ b/stdio-common/tst-scanf-binary-gnu89.c
@@ -1,4 +1,4 @@
-/* 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.
@@ -20,7 +20,7 @@
 #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>
diff --git a/stdio-common/tst-scanf-binary-main.c b/stdio-common/tst-scanf-binary-main.c
index 8745d09c22..b1038898c9 100644
--- a/stdio-common/tst-scanf-binary-main.c
+++ b/stdio-common/tst-scanf-binary-main.c
@@ -1,4 +1,4 @@
-/* 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.
 
@@ -78,7 +78,7 @@ one_check (const CHAR *s, int expected, char expected_c)
   TEST_VERIFY_EXIT (0 <= ret);
   xfclose (fp);
 
-  if (!TEST_C2X)
+  if (!TEST_C23)
     {
       expected = 0;
       expected_c = s[0] == L_('-') ? s[2] : s[1];
@@ -340,7 +340,7 @@ one_check_b (const CHAR *s, int expected, char expected_c)
 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);