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}.
21 The @code{alignof} and @code{_Alignof} macros return too large values for
22 the types @code{double} and @code{long long} in GCC 4.7.0.
25 Portability problems not fixed by Gnulib:
28 @code{_Alignas} and @code{alignas} are not always supported;
29 on platforms lacking support, the
30 macro @code{__alignas_is_defined} is not defined.
31 Supported compilers include GCC, IBM C, Sun C 5.11 and later,
32 and MSVC 7.0 and later.
34 Some compilers do not support alignment via
35 @code{alignas}/@code{_Alignas} of @code{auto} variables (i.e.,
36 variables on the stack). They diagnose and ignore the alignment: Sun
39 Some linkers do not support operands of @code{_Alignas}/@code{alignas}
40 that are greater than 8: mingw.
42 Some compilers require the operand of @code{_Alignas}/@code{alignas}
43 to be a single integer constant, not an expression: MSVC 7.0 through
46 The Sun C 5.11 compiler sometimes mishandles the alignment of multiple
47 external variables that are declared close together with
48 @code{_Alignas}/@code{alignas}. This compiler bug causes the Gnulib
49 module @code{stdalign-tests} to fail. The Sun Studio Developer Bug
50 Report Review Team assigned the internal review ID 2125432 (dated
51 2011-11-01) to this issue.
53 @code{<stdalign.h>} must be #included before @code{_Alignas} and
54 @code{_Alignof} can be used.
56 You cannot assume that @code{_Alignas} and @code{_Alignof} are reserved words;