This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT


    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.  


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]