From: pavenis AT lanet DOT lv To: rpolzer AT www42 DOT t-offline DOT de (echo 'Rudolf Polzer'>/dev/null), djgpp AT delorie DOT com Date: Thu, 19 Apr 2001 19:27:45 +0300 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: MINGW vs DJGPP Message-ID: <3ADF3C31.25763.D85DDE@localhost> In-reply-to: X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 19 Apr 2001, at 13:47, echo 'Rudolf Polzer' wrote: > pavenis AT lanet DOT lv wrote: > > On 18 Apr 2001, at 20:32, echo 'Rudolf Polzer' wrote: > > > > No. It doesn't work for C++. So best I can currently suggest is to avoid > > using broken -fpack-struct and use pair of #pragma pack(1) and > > #pragma pack() where needed. This is better as You can pack only > > those structures You really need. > > And they work then? > AFAIK -fpack-struct and #pragma pack(1) are equivalent, so the bug > should occur on both. > I suggest writting some simple examples and trying to compile to assembler source (command line option -S) and browse code generated by GCC. I think it is much faster way as asking it here (somebody should do it for You to answer, and if there will be too many questions there may be no answer at all). I suggested to use #pragma pack(1) struct foo { ... }; #pragma pack() Of course You can check whether it really puts structure members at first available byte without alignment. Andris