]> Savannah Git Hosting - gnulib.git/commitdiff
stddef: Fix test-stddef compilation error on MidnightBSD/x86.
authorBruno Haible <bruno@clisp.org>
Mon, 8 Feb 2021 22:18:34 +0000 (23:18 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 8 Feb 2021 22:18:34 +0000 (23:18 +0100)
* lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t):
Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang.

ChangeLog
lib/stddef.in.h

index 56608437c71f898c8d01ca05c59cbf4554c01c85..e6d8469eebeb23ca4013c11895d2b69292c03437 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-02-08  Bruno Haible  <bruno@clisp.org>
+
+       stddef: Fix test-stddef compilation error on MidnightBSD/x86.
+       * lib/stddef.in.h (_GL_STDDEF_ALIGNAS, rpl_max_align_t, max_align_t):
+       Don't ignore HAVE_MAX_ALIGN_T if the compiler is clang.
+
 2021-02-08  Bruno Haible  <bruno@clisp.org>
 
        Document non-standard prototypes on MidnightBSD.
index 5d3e087b449a27e676e80e3c79f536eca8731938..638589274fbc12c294ebef6abd5d577b5c09c202 100644 (file)
@@ -109,7 +109,7 @@ typedef long max_align_t;
     && defined __cplusplus
 # include <cstddef>
 #else
-# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T)
+# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __clang__))
 #  if !GNULIB_defined_max_align_t
 /* On the x86, the maximum storage alignment of double, long, etc. is 4,
    but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8,