我现在在把CH375FAT的51程序版本移植到DSP5509中,可是发现了一个警告错; 程序代码如下: typedef union _XXG_FLAGS { struct _FLAGS { unsigned char bTimer :1; unsigned char bIN_ISR :1; unsigned char bCOM_ERR :1; unsigned char bTimeout :1; unsigned char SLAVE_IS_ATTACHED :1; unsigned char SLAVE_REMOVED :1; unsigned char SLAVE_FOUND :1; // Slave USB device found unsigned char SLAVE_ENUMERATED :1; // slave USB device enumeration done unsigned char SLAVE_ONLINE :1; unsigned char TIMEOUT_ERR :1; // timeout error during data endpoint transfer unsigned char DATA_STOP :1; // device unplugged during data transfer unsigned char bData1 :1; unsigned char bCHInDone :1; unsigned char bMassDevice :1; unsigned char bFatChanged :1; } bits; } XXGFLAGS; 用CCS3.1调试时报警告错如下: "common.h", line 64: warning: nonstandard type for a bit field "common.h", line 65: warning: nonstandard type for a bit field "common.h", line 66: warning: nonstandard type for a bit field "common.h", line 67: warning: nonstandard type for a bit field "common.h", line 68: warning: nonstandard type for a bit field ......... 如果把后面的“:1”去掉就没有错误了,但这样可以吗? 想知道该如何解决,不胜感谢。