stdalign: port to stricter ISO C11
[gnulib.git] / doc / posix-headers / stdalign.texi
index b3d39f0..cad83f6 100644 (file)
@@ -2,9 +2,11 @@
 @section @file{stdalign.h}
 
 POSIX specification:@* Not in POSIX yet, but we expect it will be.
-ISO C1X @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf}
+ISO C11 (latest free draft
+@url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf})
 sections 6.5.3.4, 6.7.5, 7.15.
-C++0X @url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf}
+C++11 (latest free draft
+@url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf})
 section 18.10.
 
 Gnulib module: stdalign
@@ -13,11 +15,23 @@ Portability problems fixed by Gnulib:
 @itemize
 @item
 This header file is missing on most circa-2011 platforms.
+@item
+Clang 3.0's @code{<stdalign.h>} does not define @code{alignof}/@code{_Alignof}.
+@item
+The @code{alignof} and @code{_Alignof} macros return too large values for
+the types @code{double} and @code{long long} in GCC 4.7.0.
 @end itemize
 
 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.
@@ -43,8 +57,8 @@ module @code{stdalign-tests} to fail.  The Sun Studio Developer Bug
 Report Review Team assigned the internal review ID 2125432 (dated
 2011-11-01) to this issue.
 @item
-@code{<stdalign.h>} must be #included before @samp{_Alignas} and
-@samp{_Alignof} can be used.
+@code{<stdalign.h>} must be #included before @code{_Alignas} and
+@code{_Alignof} can be used.
 @item
 You cannot assume that @code{_Alignas} and @code{_Alignof} are reserved words;
 they might be macros.