From: "Alexei A. Frounze" Newsgroups: comp.os.msdos.djgpp Subject: Re: structures size Date: Wed, 03 May 2000 19:31:47 +0400 Organization: MTU-Intel ISP Lines: 25 Message-ID: <39104663.2DD3423F@mtu-net.ru> References: NNTP-Posting-Host: ppp110-152.dialup.mtu-net.ru Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit X-Trace: gavrilo.mtu.ru 957378998 46373 212.188.110.152 (3 May 2000 18:36:38 GMT) X-Complaints-To: usenet-abuse AT mtu DOT ru NNTP-Posting-Date: 3 May 2000 18:36:38 GMT X-Mailer: Mozilla 4.72 [en] (Win95; I) X-Accept-Language: en,ru To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com how about "#pragma pack (push, 1)" before structure definition and "#pragma pack (pop)" after? Btw, don't forget that "int" is 4 byte long in GCC, while BC++ 3.1 has 2 bytes. The same with near pointers. HTH. Alexei A. Frounze ----------------------------------------- Homepage: http://alexfru.chat.ru Mirror: http://members.xoom.com/alexfru Alexandre Devaure wrote: > > Hi, > I'd like the size of my structures is the same that in Borland C because my > program need to read a structure in flash written by a program developed > under Borland C. So, I want to use the -fpack-struct option at compilation > time. But it has no effect on the structure size and I need to add the > packed attribute on each structure. The option worked on gcc 2.8 so, the > fact it has no effect on gcc 2.95 is bug or this option is now disable? > TIA > Alex