Date: Mon, 18 Jun 2001 15:32:47 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Lunar cc: djgpp AT delorie DOT com Subject: Re: BIG problem with structure alignment! In-Reply-To: <000e01c0f7eb$4e4fc600$910fa2cb@lunar> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Mon, 18 Jun 2001, Lunar wrote: > I've read the FAQ. It says if I add an "-fpack-struct" command line option, > GCC will not align the struct. But in fact, when I try that, sizeof() still > report 4 bytes as it did before. Some versions of GCC have problems with -fpack-struct. Use the __attribute__((packed)) solution instead.