下面哪种方法可以避免编译器对结构体进行对齐优化?()
struct {
unsigned char head;
unsigned char sector;
unsigned char cylinder;
};
struct {
unsigned char head;
unsigned char sector;
unsigned char cylinder;
}__attribute__((pack));
struct {
unsigned char head;
unsigned char sector;
unsigned char cylinder;
}__attribute__((packed));
struct {
unsigned char head;
unsigned char sector;
unsigned char cylinder;
}__attribute__((aligned(0)));