struct {
unsigned int a0 : 10;
unsigned int a1 : 10;
unsigned int a2 : 10;
unsigned int a3 : 10;
unsigned int a4 : 10;
unsigned int a5 : 10;
unsigned a6 : 2;
} Age;
struct {
unsigned int a0 : 10;
unsigned int a1 : 10;
unsigned int a2 : 10;
unsigned int a3 : 10;
unsigned int a4 : 10;
unsigned int a5 : 10;
unsigned a6 : 3;
} Age2;
Age的大小为8个字节,Age2为12个字节。 通过计算Age2中使用的位数会消耗63位,因此应将其填充为8字节(64位)而不是12字节。
请解释。