[sdiy] Pointers in C
Magnus Danielson
magnus at rubidium.dyndns.org
Mon Jan 2 05:28:50 CET 2012
On 12/31/2011 06:19 PM, Jay Vaughan wrote:
> Plus a union with bit field aliases is almost self documenting .. No thorny&/&& bugs to write.
Last time I checked, bit fields in structs are not guaranteed to be
interpreted in the same way for various architectures. You can get it to
do "the right thing" for a particular architecture, but not necesserilly
outside of that scope.
So, it's a two-edged sword.
Bit-masks, shift constants etc. is unfortunatly the only way to do
portable stuff to match with protocols and hardware stuff.
Cheers,
Magnus
More information about the Synth-diy
mailing list