我現(xiàn)在在把CH375FAT的51程序版本移植到DSP5509中,可是發(fā)現(xiàn)了一個警告錯; 程序代碼如下: 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調(diào)試時報警告錯如下: "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”去掉就沒有錯誤了,但這樣可以嗎? 想知道該如何解決,不勝感謝。