[Bug target/52023] _Alignof (double) yields wrong value on x86
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Fri Jan 27 23:37:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023
--- Comment #11 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-01-27 23:26:39 UTC ---
I should add: as a matter of ABI compatibility with programs doing what
stddef.h does for max_align_t (double fields using
__attribute__((__aligned__(__alignof__(double)))), etc.), it probably is
best to distinguish between _Alignof (least ABI alignment for a type) and
__alignof__ (greatest ABI alignment for a type) here. C++11 will need
examining to determine what is right for alignof there. _Alignas(type)
should of course match _Alignof. _Alignof (expr) - the C11 keyword
applied in the GNU extension of alignof (expr) - should continue to have
the present semantics in the various special cases where the expression
references a declaration, but otherwise should probably match _Alignof.
More information about the Gcc-bugs
mailing list