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, rth at redhat dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: 21 Apr 2003 09:26:28 -0700
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- Organization: GCC Team, Red Hat
- References: <20030420022641.9A13AF28F4@nile.gnat.com>
On Apr 19, 2003, dewar at gnat dot com (Robert Dewar) wrote:
> In that case, you would specify an explicit alignment *for the
> object*, which a compiler would take as a clear indication that
> the alignment should not be increased.
So if you turn:
T i __attribute__((align(2)));
T j __attribute__((align(2)));
into
typedef T T2 __attribute__((align(2)));
T2 i, j;
you say we could get different code? It sounds to me like they
*should* be equivalent. The compiler can't tell whether the user
meant the alignment of a type is meant for composites only or for
factoring of attributes in object declarations.
--
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