标签: c bit-fields bitflags
#include <stdio.h> struct test { unsigned int x; long int y: 33; unsigned int z; }; int main() { struct test t; printf("%d",sizeof(t)); return 0; }
输出
24
long int的大小是8字节,但这里需要16字节?