]> Savannah Git Hosting - gnulib.git/commitdiff
alignasof: Ensure a correct _Alignas (regression 2023-01-15).
authorBruno Haible <bruno@clisp.org>
Tue, 11 Apr 2023 00:52:16 +0000 (02:52 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 11 Apr 2023 00:52:16 +0000 (02:52 +0200)
* m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h>
exists.

ChangeLog
m4/stdalign.m4

index 89571c2e253fb13a8f403f7f4db1f1990a45b760..c9962a09b97d5ca95dd67c341b352b5d48048f9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-04-10  Bruno Haible  <bruno@clisp.org>
+
+       alignasof: Ensure a correct _Alignas (regression 2023-01-15).
+       * m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h>
+       exists.
+
 2023-04-10  Paul Eggert  <eggert@cs.ucla.edu>
 
        doc: update list of year2038 platforms
index f49cf8ec1624666b11b3fa011b02e2260361efad..1a236d66d2f1098d2d9538a27ea6c9913f917d00 100644 (file)
@@ -151,22 +151,22 @@ AC_DEFUN([gl_ALIGNASOF],
      - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
 
    */
-# if !HAVE_STDALIGN_H
-#  if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-#   if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
-#    define _Alignas(a) alignas (a)
-#   elif (!defined __attribute__ \
-          && ((defined __APPLE__ && defined __MACH__ \
-               ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
-               : __GNUC__ && !defined __ibmxl__) \
-              || (4 <= __clang_major__) \
-              || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-              || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-#    define _Alignas(a) __attribute__ ((__aligned__ (a)))
-#   elif 1300 <= _MSC_VER
-#    define _Alignas(a) __declspec (align (a))
-#   endif
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+#  if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+#   define _Alignas(a) alignas (a)
+#  elif (!defined __attribute__ \
+         && ((defined __APPLE__ && defined __MACH__ \
+              ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+              : __GNUC__ && !defined __ibmxl__) \
+             || (4 <= __clang_major__) \
+             || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+             || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+#   define _Alignas(a) __attribute__ ((__aligned__ (a)))
+#  elif 1300 <= _MSC_VER
+#   define _Alignas(a) __declspec (align (a))
 #  endif
+# endif
+# if !HAVE_STDALIGN_H
 #  if ((defined _Alignas \
         && !(defined __cplusplus \
              && (201103 <= __cplusplus || defined _MSC_VER))) \