This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52023] _Alignof (double) yields wrong value on x86
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 27 Jan 2012 23:26:39 +0000
- Subject: [Bug target/52023] _Alignof (double) yields wrong value on x86
- Auto-submitted: auto-generated
- References: <bug-52023-4@http.gcc.gnu.org/bugzilla/>
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.