From: pavenis AT lanet DOT lv To: Eli Zaretskii , djgpp AT delorie DOT com Date: Wed, 18 Apr 2001 19:41:16 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: MINGW vs DJGPP Message-ID: <3ADDEDDC.30481.14D88F5@localhost> References: <3ADDD586 DOT 15573 DOT EE76FB AT localhost> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp AT delorie DOT com On 18 Apr 2001, at 18:05, Eli Zaretskii wrote: > > On Wed, 18 Apr 2001 pavenis AT lanet DOT lv wrote: > > > > > Compiler switch reported size of struct vp > > > > djgpp gcc 2.95.2 -fpack-struct 80 eighty > > > > djgpp gcc 2.95.3 -fpack-struct 79 seventynine > > > > mingw gcc 2.95.2 -fpack-struct 79 seventynine > > > > djgpp gcc 2.95.2 80 eighty > > > > djgpp gcc 2.95.3 80 eighty > > > > mingw gcc 2.95.2 88 eightyeight > > > > > > > > when manually added, the sum of the sizes of the struct members is _79_ > > > > > > So it looks like -fpack-struct does work, at least in 2.95.3. > > > > With my test case I'm getting following results: > > > > DJGPP port of gcc-2.95.3 : doen't work > > This is _really_ strange: how come the same binary yields different > results? Does the bug depend on the struct layout perhaps? > > I also don't understand why are there differences between MinGW, DJGPP, > and GNU/Linux for the same GCC version: these all target the same > processor, so the alignment of struct fields should be the same, no? Well it seems to work with C but not with C++ (I tested C++ first). The same under Linux. For MINGW and with gcc-3.0 prerelease -fpack-struct works both for C and C++ Andris