On Sunday 19 November 2006 07:35, Marcel Moolenaar wrote: > Also, since this discussion is the result of ARM aligning structures > on 4-byte boundaries, I think that the use of __packed to compensate > for excessive alignment is just plain wrong. We have __aligned(x) to > inform the compiler about what the alignment of an object should be > and that's the tool we should use to tell the compiler on ARM that > we in fact want 1-byte alignment. take for example, the following > structure:
Just a quick point.. __aligned__ only specified a minimum packing requirement - there is no way to specify a maximum (I believe) If the underlying problem IS too large an alignment then you're screwed if you want a reasonably portable solution.. Perhaps __packed__ convinces the compiler to reduce alignment. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
pgp4guNs0uJel.pgp
Description: PGP signature