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


    > 3 bytes long and byte-aligned, I can make an object that's 4-byte-aligned
    > (and hence 4 bytes long).  If I make a pointer to that object, that's a
    > pointer to a 3-byte type, not a 4-byte type.  I don't see how you can do

    No, it's a pointer to a 4-byte type.  

I disagree.  It's a pointer to a 3-byte type, but a 4-byte *object*.

    > Moreover, what do you do about bitfields?  Do we now have types with
    > sizes that are not multiples of bytes?

    Bitfields, at least in C, are not addressable, so this doesn't matter.
    The only thing you can do with a bitfield lvalue is write to it, and
    then you know just where you're writing.  Reading from it yields a
    promotion to the appropriate integer type.

But if you eliminate DECL_SIZE, how to you know the size of a bitfield?
The issue is why make different types in just some cases, since we know we
can't for bitfields.


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