From: Michael Uplawski Newsgroups: comp.os.msdos.djgpp Subject: Re: Generous SIZEOF Date: Tue, 14 Sep 1999 18:18:55 +0200 Organization: KNF e.V. Lines: 22 Message-ID: <2nTeN=6M6HhbMxFDzmQv8Dr+41+2@4ax.com> References: <37dbad8f DOT 30594879 AT newsserver DOT cc DOT monash DOT edu DOT au> NNTP-Posting-Host: sulla.franken.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: chico.franken.de 937326016 73214 193.175.24.189 (14 Sep 1999 16:20:16 GMT) X-Complaints-To: newsmaster AT franken DOT de NNTP-Posting-Date: 14 Sep 1999 16:20:16 GMT X-Newsreader: Forte Agent 1.6/32.525 X-No-Archive: yes To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com DavMac AT iname DOT com (Davin McCall) 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. MIchael. -- Whatever you do, try to have a reason to do it. (Winston Groom - Forrest Gump)