c++/6829: Ambiguous behaviour of __alignof__ built-in operator

rth@gcc.gnu.org rth@gcc.gnu.org
Tue May 28 11:00:00 GMT 2002


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



More information about the Gcc-bugs mailing list