This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: kenner at vlsi1 dot ultra dot nyu dot edu, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: 17 Apr 2003 17:10:38 -0300
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- Organization: GCC Team, Red Hat
- References: <20030417085200.10FEEF2DFF@nile.gnat.com>
On Apr 17, 2003, dewar at gnat dot com (Robert Dewar) wrote:
> Yes, you are specifying an alignment for objects of the type, but the
> implementation is always free to give a larger alignment.
I hope not if this would change the layout of a structure containing a
member with the specified alignment requirement. This is where
propagating the user-requested alignment for a type into the field
decl comes into play: by doing this, we make sure the alignment
request is obeyed, regardless of whether it comes from the field decl
or from its type.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva at {redhat dot com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva at {lsd dot ic dot unicamp dot br, gnu.org}
Free Software Evangelist Professional serial bug killer