2 @section @file{stdalign.h}
4 POSIX specification:@* Not in POSIX yet, but we expect it will be.
5 ISO C1X @url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf}
6 sections 6.5.3.4, 6.7.5, 7.15.
7 C++0X @url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf}
10 Gnulib module: stdalign
12 Portability problems fixed by Gnulib:
15 This header file is missing on most circa-2011 platforms.
17 Clang 3.0's @code{<stdalign.h>} does not define @code{alignof}/@code{_Alignof}.
20 Portability problems not fixed by Gnulib:
23 @code{_Alignas} and @code{alignas} are not always supported;
24 on platforms lacking support, the
25 macro @code{__alignas_is_defined} is not defined.
26 Supported compilers include GCC, IBM C, Sun C 5.11 and later,
27 and MSVC 7.0 and later.
29 Some compilers do not support alignment via
30 @code{alignas}/@code{_Alignas} of @code{auto} variables (i.e.,
31 variables on the stack). They diagnose and ignore the alignment: Sun
34 Some linkers do not support operands of @code{_Alignas}/@code{alignas}
35 that are greater than 8: mingw.
37 Some compilers require the operand of @code{_Alignas}/@code{alignas}
38 to be a single integer constant, not an expression: MSVC 7.0 through
41 The Sun C 5.11 compiler sometimes mishandles the alignment of multiple
42 external variables that are declared close together with
43 @code{_Alignas}/@code{alignas}. This compiler bug causes the Gnulib
44 module @code{stdalign-tests} to fail. The Sun Studio Developer Bug
45 Report Review Team assigned the internal review ID 2125432 (dated
46 2011-11-01) to this issue.
48 @code{<stdalign.h>} must be #included before @samp{_Alignas} and
49 @samp{_Alignof} can be used.
51 You cannot assume that @code{_Alignas} and @code{_Alignof} are reserved words;