summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-11 02:52:16 +0200
committerBruno Haible <bruno@clisp.org>2023-04-11 02:52:16 +0200
commitf92235ea521a3ace7ec6aa16629b127b21057d20 (patch)
tree025401381cc16dc9d3003cd5599e77d10fe28e78 /m4
parent9a93dbc967f90e55284496a17d0d8337eea854d6 (diff)
downloadgnulib-f92235ea521a3ace7ec6aa16629b127b21057d20.tar.gz
alignasof: Ensure a correct _Alignas (regression 2023-01-15).
* m4/stdalign.m4 (gl_ALIGNASOF): Define _Alignas also when <stdalign.h> exists.
Diffstat (limited to 'm4')
-rw-r--r--m4/stdalign.m430
1 files changed, 15 insertions, 15 deletions
diff --git a/m4/stdalign.m4 b/m4/stdalign.m4
index f49cf8ec16..1a236d66d2 100644
--- a/m4/stdalign.m4
+++ b/m4/stdalign.m4
@@ -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))) \