From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Question about Djgpp : Data Alignment Date: 10 Jul 2003 15:41:43 GMT Organization: Aachen University of Technology (RWTH) Lines: 14 Message-ID: References: NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 1057851703 12947 137.226.32.75 (10 Jul 2003 15:41:43 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 10 Jul 2003 15:41:43 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com The Shadow wrote: > I want to know if it is possible to tell the compiler not to place > any padding in data structures to allign the data on word or dword. There is. Two alternative methods exist, actually. But note that quite a lot more often than not, using those methods is the wrong way to fix the problem. Which is that you should *never* exchange data in raw binary format unless you very strictly have to. And if you do use binary, struct packing alone addresses only a rather small part of the actual portability problems that causes. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.