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. --- stdlib/Makefile | 8 ++++---- stdlib/tst-strtol-binary-c23.c | 33 +++++++++++++++++++++++++++++++++ stdlib/tst-strtol-binary-c2x.c | 33 --------------------------------- stdlib/tst-strtol-binary-gnu23.c | 28 ++++++++++++++++++++++++++++ stdlib/tst-strtol-binary-gnu2x.c | 28 ---------------------------- 5 files changed, 65 insertions(+), 65 deletions(-) create mode 100644 stdlib/tst-strtol-binary-c23.c delete mode 100644 stdlib/tst-strtol-binary-c2x.c create mode 100644 stdlib/tst-strtol-binary-gnu23.c delete mode 100644 stdlib/tst-strtol-binary-gnu2x.c (limited to 'stdlib') diff --git a/stdlib/Makefile b/stdlib/Makefile index e9f9c7856d..8b0ac63ddb 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -337,9 +337,9 @@ tests := \ tst-strtod6 \ tst-strtol \ tst-strtol-binary-c11 \ - tst-strtol-binary-c2x \ + tst-strtol-binary-c23 \ tst-strtol-binary-gnu11 \ - tst-strtol-binary-gnu2x \ + tst-strtol-binary-gnu23 \ tst-strtol-locale \ tst-strtoll \ tst-swapcontext1 \ @@ -527,9 +527,9 @@ CFLAGS-testmb.c += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Werror # (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-c23.c += -std=c11 CFLAGS-tst-strtol-binary-gnu11.c += -std=gnu11 -CFLAGS-tst-strtol-binary-gnu2x.c += -std=gnu11 +CFLAGS-tst-strtol-binary-gnu23.c += -std=gnu11 # Run a test on the header files we use. diff --git a/stdlib/tst-strtol-binary-c23.c b/stdlib/tst-strtol-binary-c23.c new file mode 100644 index 0000000000..5e2b6dd6a0 --- /dev/null +++ b/stdlib/tst-strtol-binary-c23.c @@ -0,0 +1,33 @@ +/* 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. + + 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 WIDE 0 +#define FNPFX strto +#define L_(C) C +#define TEST_C23 1 +#define TEST_Q 0 +#define TEST_LOCALE 0 + +#include diff --git a/stdlib/tst-strtol-binary-c2x.c b/stdlib/tst-strtol-binary-c2x.c deleted file mode 100644 index 5e2b6dd6a0..0000000000 --- a/stdlib/tst-strtol-binary-c2x.c +++ /dev/null @@ -1,33 +0,0 @@ -/* 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. - - 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 WIDE 0 -#define FNPFX strto -#define L_(C) C -#define TEST_C23 1 -#define TEST_Q 0 -#define TEST_LOCALE 0 - -#include diff --git a/stdlib/tst-strtol-binary-gnu23.c b/stdlib/tst-strtol-binary-gnu23.c new file mode 100644 index 0000000000..7732025dab --- /dev/null +++ b/stdlib/tst-strtol-binary-gnu23.c @@ -0,0 +1,28 @@ +/* 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. + + 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 + . */ + +#define CHAR char +#define WIDE 0 +#define FNPFX strto +#define L_(C) C +#define TEST_C23 1 +#define TEST_Q 1 +#define TEST_LOCALE 1 + +#include diff --git a/stdlib/tst-strtol-binary-gnu2x.c b/stdlib/tst-strtol-binary-gnu2x.c deleted file mode 100644 index 7732025dab..0000000000 --- a/stdlib/tst-strtol-binary-gnu2x.c +++ /dev/null @@ -1,28 +0,0 @@ -/* 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. - - 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 - . */ - -#define CHAR char -#define WIDE 0 -#define FNPFX strto -#define L_(C) C -#define TEST_C23 1 -#define TEST_Q 1 -#define TEST_LOCALE 1 - -#include -- cgit v1.2.3