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