WARNING C1106: Non-standard bitfield type
Make的时候出现,然后再Make一次就没有了。Compile也没有,好奇怪。还有Make和Compile的区别?谢谢,我的定义代码如下
typedef union { unsigned char Byte;
struct { unsigned char bit0 :1; unsigned char bit1 :1; unsigned char bit2 :1; unsigned char bit3 :1; unsigned char bit4 :1; unsigned char bit5 :1; unsigned char bit6 :1; unsigned char bit7 :1; } Bits; } BitField;
extern volatile BitField _FLAG; #define FLAG _FLAG.Byte #define FLAG_FLAG0 _FLAG.Bits.bit0 #define FLAG_FLAG1 _FLAG.Bits.bit1 #define FLAG_FLAG2 _FLAG.Bits.bit2 #define FLAG_FLAG3 _FLAG.Bits.bit3 #define FLAG_FLAG4 _FLAG.Bits.bit4 #define FLAG_FLAG5 _FLAG.Bits.bit5 #define FLAG_FLAG6 _FLAG.Bits.bit6 #define FLAG_FLAG7 _FLAG.Bits.bit7
extern volatile BitField _FLAG1; #define FLAG1 _FLAG1.Byte #define FLAG1_FLAG0 _FLAG1.Bits.bit0 #define FLAG1_FLAG1 _FLAG1.Bits.bit1 #define FLAG1_FLAG2 _FLAG1.Bits.bit2 #define FLAG1_FLAG3 _FLAG1.Bits.bit3 #define FLAG1_FLAG4 _FLAG1.Bits.bit4 #define FLAG1_FLAG5 _FLAG1.Bits.bit5 #define FLAG1_FLAG6 _FLAG1.Bits.bit6 #define FLAG1_FLAG7 _FLAG1.Bits.bit7 |