> But the bitfield group _does_ start on a byte boundary. At least > that's what the new code in stor-layout ensures.
No, it doesn't, since it does the computation on a record by record basis. Here we have a bitfield group that starts in a record and ends up in a nested record. > It's ok to assume the group starts on a byte boundary. But it's not > ok to modify bits outside of the access, so the RMW cycle has to mask > them properly. We have 2 options: 1. the GCC 4.7 approach where get_bit_range returns 0 for bitstart, which doesn't make much sense but is in keeping with store_bit_field. 2. the GCC 4.8 approach where get_bit_range attempts to return a more correct value, but is currently wrong (bitregion_start=11, bitregion_end=18) because the representative of the bitfield is wrong. The real representative of the bitfield is outside the record type. -- Eric Botcazou