Betrayed by a bitfield
Posted Feb 6, 2012 18:40 UTC (Mon) by nix
In reply to: Betrayed by a bitfield
Parent article: Betrayed by a bitfield
Not quite. s3.14's definition of 'memory location' is
either an object of scalar type, or a maximal sequence of adjacent bit-ﬁelds all having nonzero width
Therefore, even a 'long long' variable occupies a single 'memory location' by that defintion. However, a two-byte array of two chars occupies two memory locations. A location is not the same as an address.
to post comments)