This is the mail archive of the
gcc-patches@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: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: 22 Apr 2003 16:51:47 -0700
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- Organization: GCC Team, Red Hat
- References: <10304221140.AA05299@vlsi1.ultra.nyu.edu>
On Apr 22, 2003, kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner) wrote:
> But the compiler can't tell whether, when you specify alignment for a
> type, you mean for interface or for efficiency, so I think it
> shouldn't make an assumption that it's to be used only for the former
> case like you seem to believe it should do.
> No, I don't believe that, but it's not relevant. Because it *might*
> have been meant for interface, the compiler is not allowed to change
> the alignment of types.
The point is that you're saying it could increase the alignment of an
object in spite of a user-specified alignment for its type. You can't
tell whether the alignment was defined for interface, space or
performance, so a user-specified alignment for a type should be
obeyed.
--
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