On Thu, 30 Dec 1999, Nicholas Clark wrote:
> ARM gcc pads structures out to the next 4 bytes
> i386 gcc doesn't
> Alpha gcc doesn't
>
> Hence the above struct has size 14 on most architectures?
Oh, this damn cookie again...... :-(
This crops up loads of times in the Linux source; and it comes down to
everyone assuming that the alignment of a structure is the largest
alignment of all the members of the structure. While that rule is true, it
is not complete. According to ANSI the compiler is also allowed to
provide a greater alignment (can't remember the details). But as it
happens none of the other GCC/Linux platforms do - hence everyone has
forgotten the second part of the rule.
Dave
(Who fell over this yonks ago in a different part of the code....)
--
---------------- Have a happy GNU millennium! ----------------------
/ Dr. David Alan Gilbert | Running GNU/Linux on | Happy \
\ gro.gilbert @ treblig.org | Alpha, x86, ARM and SPARC | In Hex /
____________________________|___ http://www.treblig.clara.net __/
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++