DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Alexandre Oliva aoliva@redhat.com
Thu Apr 17 23:20:00 GMT 2003


On Apr 17, 2003, kenner@vlsi1.ultra.nyu.edu (Richard Kenner) wrote:

> But you don't mind if stand-alone objects of that type were aligned
> stricter.  If you specifically set the alignment of an object, you
> are presumably doing so because you *don't* want the object to be
> put at a stricter alignment.

Thanks, I do see your point now.  However, I still don't think the
compiler should disregard alignment requirements set to the type just
because an object is not part of a record.  I do agree that the
compiler may do it, and it may even happen by chance, but the property
of the type should carry over to objects and fields uniformly, in the
absence of an overrider.  The same point you make for someone setting
the alignment for an object to something different than the type's
alignment could be made for someone setting the alignment for say a
typedef, expecting it to affect all uses of the typedef.
Distinguishing between type-specified and decl-specified alignments
defeats this purpose.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                 aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist                Professional serial bug killer



More information about the Gcc mailing list