Bitfields of greater than field size

mendell at ca.ibm.com mendell at ca.ibm.com
Fri Feb 4 17:19:12 UTC 2000



I have been told that the standard allows:

struct foo {
     long xx : 128;
};

This is a field that takes up 128 bits of space, but only really uses
sizeof(long) * 8 bits.
We have to agree on where the padding goes.  I couldn't find it in the data
layout spec.
Our compiler puts it after the 'real' bits.

Mark






More information about the cxx-abi-dev mailing list