Date: Thu, 09 Jul 2009 17:41:28 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-projects@freebsd.org, src-committers@freebsd.org, Rui Paulo <rpaulo@freebsd.org> Subject: Re: svn commit: r195460 - projects/mesh11s/sys/net80211 Message-ID: <86prc9g8yf.fsf@ds4.des.no> In-Reply-To: <20090709041145.G46111@delplex.bde.org> (Bruce Evans's message of "Thu, 9 Jul 2009 04:24:46 %2B1000 (EST)") References: <200907081526.n68FQYDb055185@svn.freebsd.org> <20090709041145.G46111@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <brde@optusnet.com.au> writes: > Broken ABIs (e.g., arm?) may add padding at the end of structs, Padding at the end of a struct is *required* to ensure proper alignment of the next element in an array, e.g. struct foo { int i; char c; } bar[2]; Assuming a four-byte alignment requirement for int, the compiler *must* add three bytes of padding at the end of struct foo so bar[1].i is correctly aligned. cf. ISO/IEC 9899:1999 =C2=A76.7.2.1: 15 There may be unnamed padding at the end of a structure or union. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86prc9g8yf.fsf>