This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to stop gcc padding structs???


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. Then
make sure tDemo is 6 bytes. You may also have to play around with the
align attribute. I don't need it for my code, but you never know. 

Also i think someone once said this is target specific. It can be made
to work for the SA110, is all i can say.

        Andrew

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]