DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT

Robert Dewar dewar@gnat.com
Fri Apr 11 13:56:00 GMT 2003


> 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!



More information about the Gcc-patches mailing list