Bitfields

If your program's structure has bitfields and the Power Architecture alignment does not give you as small a structure as you desire, double-check that you are specifying the smallest integer size for your bitfields.

For example, Before would be smaller if it were written as shown in After.

Listing 1. Before
typedef struct red {
   unsigned a: 1;
   unsigned b: 1;
   unsigned c: 1;
} red;
Listing 2. After
typedef struct red {
   unsigned char a: 1;
   unsigned char b: 1;
   unsigned char c: 1;
} red;