• sizeof of struct with bit Field
    please explain me why the sizeof (C51) returns 6 bytes for this struct instead of 5: typedef struct DEKO_COMM_HEADER { UINT16 m_uiMsgOpcode; UCHAR8 m_sblMsgPriority :2; UINT16 m_sblDataLength...
  • sizeof of struct with bit Field
    please explain me why the sizeof (C51) returns 6 bytes for this struct instead of 5: typedef struct DEKO_COMM_HEADER { UINT16 m_uiMsgOpcode; UCHAR8 m_sblMsgPriority :2; UINT16 m_sblDataLength...
  • bit field
    Hi All, I have a struct: union U { unsigned char c; struct { unsigned char bit0 : 1; unsigned char bit1 : 1; unsigned char bit2 : 1; . . . }S; }; } If I test multiple bits together...
  • bit field
    Hi All, I have a struct: union U { unsigned char c; struct { unsigned char bit0 : 1; unsigned char bit1 : 1; unsigned char bit2 : 1; . . . }S; }; } If I test multiple bits together...
  • signed bit fields
    Does anybody knows, Keil C compiler V7.xx supports bit fields with signed types or not? The code always generated same as for unsigned types. This is compiler bug or feature? My code compiled with Keil...