* tests/test-stdalign.c (TEST_ALIGNMENT): Shrink back to 8.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 1 Nov 2011 15:22:55 +0000 (08:22 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 1 Nov 2011 15:23:36 +0000 (08:23 -0700)
mingw supports alignments only up to 8 (!).  Reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00006.html>.
* doc/posix-headers/stdalign.texi (stdalign.h): Document this.

ChangeLog
doc/posix-headers/stdalign.texi
tests/test-stdalign.c

index 1c6d1f0..7a1eac5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-11-01  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * tests/test-stdalign.c (TEST_ALIGNMENT): Shrink back to 8.
+       mingw supports alignments only up to 8 (!).  Reported by Bruno Haible in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2011-11/msg00006.html>.
+       * doc/posix-headers/stdalign.texi (stdalign.h): Document this.
+
 2011-11-01  Bruno Haible  <bruno@clisp.org>
 
        alignof: Avoid collision with stdalign module.
index c5fbc5f..9d2499a 100644 (file)
@@ -29,6 +29,9 @@ Some compilers do not support alignment via
 variables on the stack).  They diagnose and ignore the alignment: Sun
 C 5.11.
 @item
+Some linkers do not support operands of @code{_Alignas}/@code{alignas}
+that are greater than 8: mingw.
+@item
 Some compilers require the operand of @code{_Alignas}/@code{alignas}
 to be a single integer constant, not an expression: MSVC 7.0 through
 at least 10.0.
index c1d8677..66a2040 100644 (file)
@@ -43,7 +43,9 @@ verify (__alignas_is_defined == 1);
 # ifndef alignas
 #  error "alignas is not a macro"
 # endif
-# define TEST_ALIGNMENT 16
+/* mingw can go up only to 8.  8 is all that GNU Emacs needs, so let's
+   limit the test to 8 for now.  */
+# define TEST_ALIGNMENT 8
 #else
 # define _Alignas(alignment)
 # define alignas(alignment)