diff doc/posix-headers/stdalign.texi @ 17364:7524d97ae56f

stdalign: port to stricter ISO C11 ISO C11 says that _Alignof's operand must be a parenthesized type. Problem reported by Eli Zaretskii in <http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00960.html>. * doc/posix-headers/stdalign.texi (stdalign.h): Document this. * m4/stdalign.m4 (gl_STDALIGN_H): Don't use _Alignof (expr).
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 29 Mar 2013 19:47:13 -0700
parents a9eaa22dc3f6
children 79877e369ef2
line wrap: on
line diff
--- a/doc/posix-headers/stdalign.texi	Tue Mar 19 09:08:47 2013 -0700
+++ b/doc/posix-headers/stdalign.texi	Fri Mar 29 19:47:13 2013 -0700
@@ -25,6 +25,13 @@
 Portability problems not fixed by Gnulib:
 @itemize
 @item
+In ISO C11, the operand of @code{alignof}/@code{_Alignof} must be a
+parenthesized type.  Recent versions of GCC support an extension in
+which the operand can also be a unary expression, as with
+@code{sizeof}.  We don't know of any compilers that support
+@code{alignof}/@code{_Alignof} without also supporting this extension;
+if you find one please let us know.
+@item
 @code{_Alignas} and @code{alignas} are not always supported;
 on platforms lacking support, the
 macro @code{__alignas_is_defined} is not defined.