From ea26437be087a9a07c2505015c0c4a7531e578f5 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Dec 2022 00:10:23 -0800 Subject: [PATCH] =?utf8?q?doc:=20C2x=20=E2=86=92=20C23?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- doc/attribute.texi | 6 +++--- doc/posix-functions/timespec_getres.texi | 2 +- lib/attribute.h | 2 +- lib/limits.in.h | 4 ++-- m4/gnulib-common.m4 | 2 +- tests/test-limits-h.c | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/attribute.texi b/doc/attribute.texi index f4e18b5169..67fe1f1b7f 100644 --- a/doc/attribute.texi +++ b/doc/attribute.texi @@ -30,7 +30,7 @@ extern char *crypt (char const *, char const *) @noindent @code{NODISCARD} expands to @code{[[nodiscard]]} if the compiler -supports this C2x syntax, otherwise to +supports this C23 syntax, otherwise to @code{__attribute__ ((__warn_unused_result__))} if the compiler is a recent-enough GCC or GCC-like compiler, otherwise to nothing. @code{ATTRIBUTE_NOTHROW} expands to @code{__attribute__ @@ -41,11 +41,11 @@ compiler, and to nothing otherwise. Similarly for recent-enough GCC, and to nothing otherwise. Most of these attribute names begin with @code{ATTRIBUTE_}. -A few do not, because they are part of C2x and their +A few do not, because they are part of C23 and their names are not likely to clash with other macro names. These macros are @code{DEPRECATED}, @code{FALLTHROUGH}, @code{MAYBE_UNUSED}, and @code{NODISCARD}, which can -be defined to @code{[[deprecated]]} etc.@: on C2x platforms. +be defined to @code{[[deprecated]]} etc.@: on C23 platforms. Also, these exceptional macros should be placed at the start of function declarations, whereas the @code{ATTRIBUTE_*} macros can be placed at the end. diff --git a/doc/posix-functions/timespec_getres.texi b/doc/posix-functions/timespec_getres.texi index c18a3635ff..76b5f21a13 100644 --- a/doc/posix-functions/timespec_getres.texi +++ b/doc/posix-functions/timespec_getres.texi @@ -2,7 +2,7 @@ @section @code{timespec_getres} @findex timespec_getres -ISO C2x specification:@* @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2596.pdf} section 7.27.2.6 +ISO C23 specification:@* @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf} section 7.29.2.7 Gnulib module: timespec_getres diff --git a/lib/attribute.h b/lib/attribute.h index 378d4f0a80..2dd14f40ef 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -32,7 +32,7 @@ /* This file defines two types of attributes: - * C2x standard attributes. These have macro names that do not begin with + * C23 standard attributes. These have macro names that do not begin with 'ATTRIBUTE_'. * Selected GCC attributes; see: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html diff --git a/lib/limits.in.h b/lib/limits.in.h index b77bf75c5f..931ed15793 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -99,7 +99,7 @@ # endif #endif -/* Macros specified by C2x and by ISO/IEC TS 18661-1:2014. */ +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ #if (! defined ULLONG_WIDTH \ && (defined _GNU_SOURCE || defined __STDC_WANT_IEC_60559_BFP_EXT__ \ @@ -117,7 +117,7 @@ # define ULLONG_WIDTH _GL_INTEGER_WIDTH (0, ULLONG_MAX) #endif -/* Macros specified by C2x. */ +/* Macros specified by C23. */ #if (! defined BOOL_WIDTH \ && (defined _GNU_SOURCE \ diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 8f5cc1617a..728a006ce8 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -309,7 +309,7 @@ AC_DEFUN([gl_COMMON_BODY], [ - enumeration, enumeration item, - typedef, in C++ also: class. */ -/* In C++ and C2x, this is spelled [[__maybe_unused__]]. +/* In C++ and C23, this is spelled [[__maybe_unused__]]. GCC's syntax is __attribute__ ((__unused__)). clang supports both syntaxes. */ #ifdef __has_c_attribute diff --git a/tests/test-limits-h.c b/tests/test-limits-h.c index ddcb5d5648..8432ddc72d 100644 --- a/tests/test-limits-h.c +++ b/tests/test-limits-h.c @@ -94,7 +94,7 @@ unsigned long long limits11[] = { ULLONG_MAX }; static_assert (TYPE_MINIMUM (unsigned long long int) == 0); static_assert (TYPE_MAXIMUM (unsigned long long int) == ULLONG_MAX); -/* Macros specified by ISO/IEC TS 18661-1:2014. */ +/* Macros specified by C23 and by ISO/IEC TS 18661-1:2014. */ verify_width (CHAR_WIDTH, CHAR_MIN, CHAR_MAX); verify_width (SCHAR_WIDTH, SCHAR_MIN, SCHAR_MAX); @@ -108,7 +108,7 @@ verify_width (ULONG_WIDTH, 0, ULONG_MAX); verify_width (LLONG_WIDTH, LLONG_MIN, LLONG_MAX); verify_width (ULLONG_WIDTH, 0, ULLONG_MAX); -/* Macros specified by C2x. */ +/* Macros specified by C23. */ int bool_attrs[] = { BOOL_MAX, BOOL_WIDTH }; static_assert (BOOL_MAX == (((1U << (BOOL_WIDTH - 1)) - 1) * 2) + 1); -- 2.39.5