hemanth.venkatesh@xxxxxxxxx wrote: > Hi All, > > > > I ran the below program on an IA32 and AU1100 machine, both being little > endian machines and got different results. Does anyone know what could > be the cause of this behaviour. This problem is blocking us from booting > the cramfs rootfs. > > > > #include <stdio.h> > > typedef unsigned int u32; > > main() > > { > > struct tmp{ > > u32 namelen:6,offset:26; > > }tmp1; > > (*(int *)(&tmp1))=0x4c0; This makes non-portable assumptions about the bitfield layout. The results are platform-dependent (or rather ABI-dependent). Portable code needs to avoid acessing bitfields via typecasts. Thiemo