On 1 August 2011 14:08, Michael Mc Donnell michael@mcdonnell.dk wrote:
With the bitfields I'm not sure about stuff like endianess. My gut feeling would be to use bitmasks and shifts to separate a DWORD instead, but bitfields certainly look nicer. Beyond that endianess is a somewhat academic consideration with an API that's available on x86 only. So I'd say keep the bitfields.
Ok good. That'll keep me from the pain of doing bit twiddling on a little endian machine :-)
You can't do that, even on x86. Bitfield memory layout is undefined.