Packing of structure fields and whole structs

2006-12-05 Thread Phil Endecott
Dear GCC Experts, I am trying to understand the subtleties of __attribute__((packed)). I have some code that works on x86, where unaligned accesses work, but fails on ARM where they do not. As far as I can see, if I declare a struct with the packed attribute applied to the whole struct, lik

Re: Packing of structure fields and whole structs

2006-12-05 Thread Paul Brook
On Tuesday 05 December 2006 22:40, Phil Endecott wrote: > Dear GCC Experts, > > I am trying to understand the subtleties of __attribute__((packed)). I > have some code that works on x86, where unaligned accesses work, but > fails on ARM where they do not. > > As far as I can see, if I declare a st