zhengda said:
I don't understand it well. Can you take an example?
Example padding bytes:
Say, sizeof int == 2, CHAR_BIT == 8 (i.e., we have 16 bit ints)
and access to 8 byte storage regions is somehow "more efficient"
than three times 2 bytes. Then, struct x might have the following
layout:
first two bytes -- a
second two bytes -- b
third two bytes -- c
last two bytes -- padding
i.e. sizeof (struct x) == 8 instead of the minimal possible 6.
Writing z = y does not say what happens to the padding -- it might
be copied over or not.
Example different representations[*]:
Say, we have one's complement. This gives us an all bits zero
representation of 0 and and all bits one representation for 0,
a "negative zero". If the implementation wants to eliminate