Bit-fields

Mark Mitchell mark at codesourcery.com
Wed Mar 15 21:52:22 UTC 2000


It seems to me that our handling of over-sized bitfields is a bit
over-generous.  For example, given:

  char c : 128;

we'll align the bitfield as for a `long long', even though the
standard specifically says the extra bits are ignored.  You can't take
the address of a bitfield (even though in our ABI it will be aligned),
so it's not even legal to take the address, cast it to some very long
type, and make use of the storage -- there's no way to get the offset
of the bitfield.  Why not just align this on a `char' boundary?

--
Mark Mitchell                   mark at codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com




More information about the cxx-abi-dev mailing list