This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]