From: Bruno Haible Date: Thu, 20 Aug 2020 21:52:23 +0000 (+0200) Subject: stdalign: Fix test failures on 32-bit platforms with clang versions < 8. X-Git-Tag: v1.0~3697 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=2af490a4c4ce85567296e27be6a9528964ca851e;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index b93fde0ea7..a9adf97557 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-08-20 Bruno Haible + + 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 Sync up ProjectQuirks comments and documentation diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index ad1bd008a1..867053fdf3 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -54,10 +54,12 @@ #undef _Alignof /* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 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)