Message-Id: <199603110922.EAA15978@delorie.com> Date: Mon, 11 Mar 96 11:20:18 LIT From: Martynas Kunigelis Subject: Re: Packed Align bug in G++ 2.7.2?? To: DJGPP mailing list In-Reply-To: Your message of Sun, 10 Mar 1996 08:23:59 +0200 (IST) On Sun, 10 Mar 1996 08:23:59 +0200 (IST) you said: > >On 8 Mar 1996, Troy D. Van Horn wrote: > >> I just discovered the reason for the problem today--I was compiling the >> program using C++. I wrote a small test program and which uses the following >> structure from , and it produced different offsets when I compile to >> assembly depending on whether I use C or C++. >[snip] >> Evendently the C++ compiler does not properly handel the >> __attribute__((packed)) command. > >Yes, that's right. This is a known GCC bug, so it won't be corrected >until some future GCC version. ...But you can still correct this behaviour by using #pragma pack(alignment). Martynas Kunigelis