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: PR 6212


    > I'd like to move more toward a situation where we are allowed
    > to have these different from that of the type even more than we do now.

    Why?  I can think of no valid use for this.  It's just confusing.

Otherwise you make bogus types that end up having to be converted from 
and to and it's a pain.

Suppose you have an object with an alignment stricter than its type.
What do you do?  Say you have an object whose type is 1-byte integer
with a user-specifed alignment of 32 bits.  What do you do?  If you
say that DECL_ALIGN must equal TYPE_ALIGN, you end up constructing a
record type containing the character as a field and have to deal with
converting to and from it.

It's far simpler just to say that DECL_TYPE is char_type_node,
DECL_ALIGN and DECL_SIZE are 32, and DECL_SIZE_UNIT is 4.


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