DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Apr 17 08:12:00 GMT 2003
What I don't get is why such cases must be distinguished. I mean, if
an alignment is specified by the user for a type, is it not true that
the user is also specifying the alignment for any objects of that
type, except when overridden for a specific object?
Perhaps, but the point is that if you set DECL_USER_ALIGN from
TYPE_USER_ALIGN you *can't tell* if it was "overridden for a specific
object" or not and that information is useful.
It seems to me that this is the point of the change that propagates
TYPE_USER_ALIGN to DECL_USER_ALIGN, and I can't see how this could
possibly be incorrect.
It might be reasonable for a "consumer" of these bits to do
DECL_USER_ALIGN (decl) || TYPE_USER_ALIGN (TREE_TYPE (decl))
if it wanted that interpretation, but I think all four cases are
potentially different and the flags should be set up to be able to
distinguish them.
More information about the Gcc
mailing list