Mail Archives: djgpp/1999/09/15/13:02:00
On Tue, 14 Sep 1999, Michael Uplawski wrote:
> >The compiler is rounding up the size of the structure to the nearest
> >four byte boundary, so that accesses are more efficient (particularly
> >when using an array of structures).
> >
> >If you want to prevent this, declare the structure with attribute
> >packed eg:
> (...)
> >} __attribute__((packed));
> >struct CD All[MAX];
>
> Needless or not, THANK YOU! :-)
>
> I am rather sure, that I would have otherwise waited a long time for
> this tip to come along.
Please note that this is explained in the DJGPP FAQ list (section
22.10). Look into the FAQ first, and you will never need to wait a
long time for such tips!
- Raw text -