Re: [PATCH] stdalign-tests: port to C23

2022-09-13 Thread Paul Eggert

On 9/13/22 15:19, Bruno Haible wrote:

_Alignas is obsolescent?


Although it's still in the standard as of draft C23, it is to some 
extent deprecated as it is no longer necessarily a keyword (it might be 
a macro). My guess is that it will be obsoleted in some future version 
of the standard, if they keep producing new standards. As it's an 
unnecessary appendage at this point I think it's safe to call it 
obsolescent.


Similarly for other former keywords like _Bool and _Static_assert.




Re: [PATCH] stdalign-tests: port to C23

2022-09-13 Thread Bruno Haible
Paul Eggert wrote:
> _Alignof, or _Alignas as they are obsolescent.

_Alignas is obsolescent? Then we should better talk about 'alignas' instead.


2022-09-13  Bruno Haible  

Prefer talking about alignas than _Alignas.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Don't mention _Alignas in a
comment.
* m4/stdalign.m4 (gl_STDALIGN_H): Likewise.

diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4
index 8a5daa230e..d17cbec58c 100644
--- a/m4/gnulib-common.m4
+++ b/m4/gnulib-common.m4
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 73
+# gnulib-common.m4 serial 74
 dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -115,7 +115,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 # define _GL_HAS_C_ATTRIBUTE(attr) 0
 #endif
 
-]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's _Alignas instead.
+]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
 [
 /* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the 
function
is the size of the returned memory block.
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index 78577cb2ac..c3283760d5 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -30,7 +30,7 @@ AC_DEFUN([gl_STDALIGN_H],
 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
 
-/* Test _Alignas only on platforms where gnulib can help.  */
+/* Test alignas only on platforms where gnulib can help.  */
 #if \
 ((defined __cplusplus && 201103 <= __cplusplus) \
  || (__TINYC__ && defined __attribute__) \