This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

28335在CCS3.3下编程使用位域的问题

我在CCS3.3下使用位域

如果这样定义的话

struct  NWBYTE0BIT
{
    unsigned char NC           :2;            /*Network Command*/              
    unsigned char SYNCbits     :6;              /*SYNCbits Reserved */
};

就会有warning出现   warning: nonstandard type for a bit field 

按照下面的定义就ok了

struct  NWBYTE0BIT
{
    unsigned int NC           :2;            /*Network Command*/              
    unsigned int SYNCbits     :6;              /*SYNCbits Reserved */
    unsigned int              :8;
};

就这点有点不理解,是我设置的问题

还是编译器上有一些限制?

x 出现错误。请重试或与管理员联系。