0

Assume this struct:

typedef struct test {
   unsigned int a : 3;
   unsigned int b : 3;
} test;

doing a sizeof(test) outputs 4. The above data can be saved in 6 bits (or only 1 byte) so why is gcc still reserving the size of int?

0 Answers0