From 83d8d289b295406e30bc8a079286b093d552c3a5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 1 Feb 2024 17:55:57 +0000 Subject: Rename c2x / gnu2x tests to c23 / gnu23 Complete the internal renaming from "C2X" and related names in GCC by renaming *-c2x and *-gnu2x tests to *-c23 and *-gnu23. Tested for x86_64, and with build-many-glibcs.py for powerpc64le. --- stdio-common/Makefile | 4 ++-- stdio-common/tst-scanf-binary-c23.c | 31 +++++++++++++++++++++++++++++++ stdio-common/tst-scanf-binary-c2x.c | 31 ------------------------------- 3 files changed, 33 insertions(+), 33 deletions(-) create mode 100644 stdio-common/tst-scanf-binary-c23.c delete mode 100644 stdio-common/tst-scanf-binary-c2x.c (limited to 'stdio-common') diff --git a/stdio-common/Makefile b/stdio-common/Makefile index 60a7f4cff3..6447b6b444 100644 --- a/stdio-common/Makefile +++ b/stdio-common/Makefile @@ -240,7 +240,7 @@ tests := \ tst-renameat2 \ tst-rndseek \ tst-scanf-binary-c11 \ - tst-scanf-binary-c2x \ + tst-scanf-binary-c23 \ tst-scanf-binary-gnu11 \ tst-scanf-binary-gnu89 \ tst-scanf-intn \ @@ -495,7 +495,7 @@ CFLAGS-tst-memstream-string.c += -fno-builtin-fprintf # 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)\" +CFLAGS-tst-scanf-binary-c23.c += -std=c11 -DOBJPFX=\"$(objpfx)\" CFLAGS-tst-scanf-binary-gnu11.c += -std=gnu11 -DOBJPFX=\"$(objpfx)\" CFLAGS-tst-scanf-binary-gnu89.c += -std=gnu89 -DOBJPFX=\"$(objpfx)\" diff --git a/stdio-common/tst-scanf-binary-c23.c b/stdio-common/tst-scanf-binary-c23.c new file mode 100644 index 0000000000..ebb9f04937 --- /dev/null +++ b/stdio-common/tst-scanf-binary-c23.c @@ -0,0 +1,31 @@ +/* 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. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* Some versions of GCC supported for building glibc do not support + -std=c23 or -std=c2x. */ +#undef _GNU_SOURCE +#define _ISOC23_SOURCE + +#define CHAR char +#define FNW +#define L_(C) C +#define TEST_C23 1 +#define STD "c23" + +#include diff --git a/stdio-common/tst-scanf-binary-c2x.c b/stdio-common/tst-scanf-binary-c2x.c deleted file mode 100644 index ebb9f04937..0000000000 --- a/stdio-common/tst-scanf-binary-c2x.c +++ /dev/null @@ -1,31 +0,0 @@ -/* 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. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -/* Some versions of GCC supported for building glibc do not support - -std=c23 or -std=c2x. */ -#undef _GNU_SOURCE -#define _ISOC23_SOURCE - -#define CHAR char -#define FNW -#define L_(C) C -#define TEST_C23 1 -#define STD "c23" - -#include -- cgit 1.4.1