This is the mail archive of the gcc-patches@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: Ping^2: [patch] convert some call ABI macros to hooks, apply to sh, add bitfield swapper


> And ms_bitfield_layout_p determines this?  What about 
> !PCC_BITFIELD_TYPE_MATTERS?

PCC_BITFIELD_TYPE_MATTERS doesn't seem to prevent a char bitfield from
being allocated within an int space's bits.  It does, however, prevent
a bitfield from spanning two underlying type allocation units.

ms_bitfield_layout_p requires that a change in the underlying type
"close out" the previous type's bits and start a new allocation space.

Hmmm, now that I think about it, I might need to check both :-P

> Anyway, all of this needs to be a huge comment before that bit of code.

I've added this so far:

  /* We cannot allow bitfield reversal unless the struct has a
     consistent mapping between the bytes of the struct and the
     underlying type of the bits stored in those bytes.  So, we
     enforce that here.  */

How much more explanation seems reasonable at that point in the code?


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