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: dewar at gnat dot com (Robert Dewar)
- To: kenner at vlsi1 dot ultra dot nyu dot edu, rth at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 11 Apr 2003 09:56:17 -0400 (EDT)
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
> Why? It seems like what it means is "the alignment of this type was set the
> way it is for a reason. Please don't change it." And that applies here.
Yes, that's exactly what we want in Ada, and the reason is that Ada has to
know the alignment. Furthermore, the semantics of this alignment are required
to be exactly what would be obtained if a confirming rep clause were given.
So either
a) the confirming rep clause (and setting USER_ALIGN) has no effect in this
case, in which case why bother about it.
or
b) the confirming rep clause WOULD have an effect if USER_ALIGN is only set
in the presence of this rep clause. In that case we must set USER_ALIGN
regardless, since we don't want the addition of the confirming rep clause
to have any effect.
Seems clear to me!