stdalign.h
==========

POSIX specification:
 Not in POSIX yet, but we expect it will be. ISO C11 (latest free draft http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf) sections 6.5.3.4, 6.7.5, 7.15. C++11 (latest free draft http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf) section 18.10.

Gnulib module: stdalign

Portability problems fixed by Gnulib:

  * This header file is missing on most circa-2011 platforms.

  * Clang 3.0's <stdalign.h> does not define alignof/_Alignof.

  * The alignof and _Alignof macros return too large values for the types double and long long in GCC 4.7.0.

Portability problems not fixed by Gnulib:

  * In ISO C11, the operand of alignof/_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 sizeof.  The Gnulib substitute does not support this extension.

  * _Alignas and alignas are not always supported; on platforms lacking support, the macro __alignas_is_defined is not defined. Supported compilers include GCC, IBM C, Sun C 5.11 and later, and MSVC 7.0 and later.

  * Some compilers do not support alignment via alignas/_Alignas of auto variables (i.e., variables on the stack).  They diagnose and ignore the alignment: Sun C 5.11.

  * Some linkers do not support operands of _Alignas/alignas that are greater than 8: mingw.

  * Some compilers require the operand of _Alignas/alignas to be a single integer constant, not an expression: MSVC 7.0 through at least 10.0.

  * The Sun C 5.11 compiler sometimes mishandles the alignment of multiple external variables that are declared close together with _Alignas/alignas.  This compiler bug causes the Gnulib module 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.

  * <stdalign.h> must be #included before _Alignas and _Alignof can be used.

  * You cannot assume that _Alignas and _Alignof are reserved words; they might be macros.