From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Edwards To: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] How to stop gcc padding structs??? Date: Mon, 29 Jan 2001 07:24:00 -0000 Message-id: <20010129092833.A11509@visi.com> References: <20010128124058.A9989@visi.com> <20010129092709.A13176@biferten.ma.tech.ascom.ch> X-SW-Source: 2001-01/msg00453.html On Mon, Jan 29, 2001 at 09:27:09AM +0100, Andrew Lunn wrote: > On Sun, Jan 28, 2001 at 12:40:59PM -0600, Grant Edwards wrote: > > > > I'm again fighting with gcc trying (and failing) to get it to > > stop putting padding bytes into structs. Have any eCosians > > figured out how to prevent gcc from padding structs? > > Yes, but more by luck combined with trial and error than anything > else. When you have this sort of structure in structre arrangement i > find it best to work upwards. Make sure sizeof(high) is realy 2. It's 4, and nothing I try with __attribute__((packed)) will make it 2. I'll mess with alignement attributes some. -- Grant Edwards grante@visi.com