Date: Wed, 15 Sep 1999 11:55:46 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Michael Uplawski cc: djgpp AT delorie DOT com Subject: Re: Generous SIZEOF In-Reply-To: <2nTeN=6M6HhbMxFDzmQv8Dr+41+2@4ax.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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!