This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/6829: Ambiguous behaviour of __alignof__ built-in operator
- From: rth at gcc dot gnu dot org
- To: Grigory_Zagorodnev at vniief dot ims dot intel dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Date: 28 May 2002 18:00:08 -0000
- Subject: Re: c++/6829: Ambiguous behaviour of __alignof__ built-in operator
- Reply-to: rth at gcc dot gnu dot org, Grigory_Zagorodnev at vniief dot ims dot intel dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: Ambiguous behaviour of __alignof__ built-in operator
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue May 28 11:00:06 2002
State-Changed-Why:
Not a bug. __alignof__ is not expressive enough to cover all
situations. It is documented as the *preferred* alignment.
The i386 svr4 abi (which linux follows) caps alignment of
structure members at 4. So if you put a double in memory,
gcc will align to 8 (because it doesn't affect the abi),
whereas within a structure we are constrained to the
narrower alignment.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6829