From: George Foot Newsgroups: comp.os.msdos.djgpp Subject: Re: Struct field aligning Date: 13 Nov 1997 20:04:16 GMT Organization: Oxford University, England Message-ID: <64fmg0$p3b$1@news.ox.ac.uk> References: <64fhj4$iev AT mn5 DOT swip DOT net> NNTP-Posting-Host: sable.ox.ac.uk Lines: 16 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On 13 Nov 1997 18:40:36 GMT in comp.os.msdos.djgpp Johan Levin wrote: : In this case all elements of the structure becomes : dword-aligned. That might be good for speed, but : I'm trying to read the header of a file that doesn't : align it's fields like this. Is it possible to disable : this aligning for a structure? Please refer to section 22.9 of the FAQ; it explains this in depth. Briefly, you need to use the __attribute__ system to tell gcc to `pack' the struct, i.e. remove all the padding. -- Regards, george DOT foot AT merton DOT oxford DOT ac DOT uk