Date: Mon, 18 Jun 2001 10:15:18 +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: <001101c0f7a6$837b46a0$cf10a2cb@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 met this problem with structure declaration: > I did have a struct like this: > struct T1{ > char _t1; > short _t2; > }; > > and the sizeof(T1) return a result of 4, instead of 3 as I expected. Why = > is that? If it's because of some aligment option, then could you help me = > turn them off? Please see section 22.11 of the DJGPP FAQ list, it explains this issue. And please don't post in HTML.