Code:
#include <stdio.h>
struct mybitfields
{
unsigned short a : 4;
unsigned short b : 5;
unsigned short c : 7;
}test;
int main(void)
{
int i = 0;
test.a = 2;
test.b = 3;
test.c = 0;
i = *((short *)&test);
printf("%d",i);
return 0;
}
(compile environment Windows XP sp3,TDM-GCC 4.6.1,X86 architecture)

