Subject: Re: Strange C compiler code generation
To: Richard Earnshaw <rearnsha@buzzard.freeserve.co.uk>
From: Charles M. Hannum <root@ihack.net>
List: port-arm32
Date: 02/24/2001 17:19:55
On Sun, Feb 25, 2001 at 12:30:06AM +0000, Richard Earnshaw wrote:
>
> It turns out that the reason for the difference between NetBSD and linux
> is that on linux, structures are, by default, aligned to a 32-bit
> boundary, even if they are composed solely of elements with less alignment
> than that. On netbsd, structures are aligned to a byte boundary if no
> field within the structure requires a larger alignement. Hence
>
> #pragma pack(1)
Are you sure the Lignux compiler isn't just ignored the #pragma? AFAIK
it's always been silently ignored on platforms that don't support it.