typedef struct { volatile unsigned short int bit0:1; volatile unsigned short int bit1:1; volatile unsigned short int bit2:1; volatile unsigned short int bit3:1; volatile unsigned short int bit4:1; volatile unsigned short int bit5:1; volatile unsigned short int bit6:1; volatile unsigned short int bit7:1; volatile unsigned short int bit8:1; volatile unsigned short int bit9:1; volatile unsigned short int bit10:1; volatile unsigned short int bit11:1; volatile unsigned short int bit12:1; volatile unsigned short int bit13:1; volatile unsigned short int bit14:1; volatile unsigned short int bit15:1; }BitReg; typedef union { volatile unsigned short int Reg; BitReg Bits; }sfrReg; /* Declaring this volatile prevents the warning mentioned * below. But is it necessary? */ extern sfrReg SSCRICReg; #define SSCRIR SSCRICReg.Bits.bit7 void wait_sscrir(void) { /* 3rd-party code analysis tool warns that SSCRIR is used * in the condition but not modified in the loop. But not * if it's declared volatile as described above. */ while(SSCRIR == 0) { } }