]> Savannah Git Hosting - gnulib.git/commitdiff
stdalign: Fix test failures on 32-bit platforms with clang versions < 8.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Aug 2020 21:52:23 +0000 (23:52 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 20 Aug 2020 21:52:23 +0000 (23:52 +0200)
* lib/stdalign.in.h (_Alignof): For clang versions < 8, use the same
workaround as for GCC versions < 4.9.

ChangeLog
lib/stdalign.in.h

index b93fde0ea7f37c5ebb3070f6c2697a144a8dd44a..a9adf9755729d5d4ddc9d13e210f6f9547e33b8e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-20  Bruno Haible  <bruno@clisp.org>
+
+       stdalign: Fix test failures on 32-bit platforms with clang versions < 8.
+       * lib/stdalign.in.h (_Alignof): For clang versions < 8, use the same
+       workaround as for GCC versions < 4.9.
+
 2020-08-20  Siddhesh Poyarekar  <siddhesh@gotplt.org>
 
        Sync up ProjectQuirks comments and documentation
index ad1bd008a118ca8126fc38c0a187406b2c29706e..867053fdf3101c89a7192a8f59846208fe592e1b 100644 (file)
 #undef _Alignof
 
 /* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
-   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.  */
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
 #if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
      || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
-         && !defined __clang__))
+         && !defined __clang__) \
+     || (defined __clang__ && __clang_major__ < 8))
 # ifdef __cplusplus
 #  if 201103 <= __cplusplus
 #   define _Alignof(type) alignof (type)