Table of Contents        Previous topic       Next topic       

C COMPILER->Compiler Data Formats->bit fields

The compiler supports bitfield of type unsigned char, char, unsigned int, int, unsigned long and long.

The bitfields are packed in accordance with conventional bit positions.  For example:
struct tag {
    unsigned char b1 : 1
    unsigned char b2 : 3
    unsigned char b3 : 4
} S;

S will be an 8 bit wide object.