Betrayed by a bitfield
Posted Feb 6, 2012 18:40 UTC (Mon) by
nix (subscriber, #2304)
In reply to:
Betrayed by a bitfield by daglwn
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-fields 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.
(
Log in to post comments)