Date: Tue, 9 May 2000 12:19:08 +0200 (MET DST) From: pad2369 Message-Id: <200005091019.MAA17313@maggiore.iperbole.bologna.it> To: Eli Zaretskii Cc: djgpp AT delorie DOT com References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 8bit User-Agent: IMP/PHP3 Imap webMail Program 2.0.11 Sender: pad2369 AT iperbole DOT bologna DOT it Subject: Re: Datatype sizes Reply-To: djgpp AT delorie DOT com Eli Zaretskii : > > In DJGPP, since it's a 32-bit compiler, when I make > a variable of type > char, > > does it store that variable in a 32-bit slot in > memory, or an 8-bit slot? > > A `char' takes a single byte. I am not an expert about gcc internals, so I sould say something silly here: do you mean that this function allocates only two bytes of stack for auto variables? void func(void) { char a, b; ... } I thought gcc aligned to 32 bit words auto variables for efficiency reasons, like with struct members, thus allocating 8 bytes in the above example. More or less equivalent to this: struct char_ab { char a, b; }; void func(void) { struct char_ab ab; ... } ciao Giacomo ------------------------------------------------------ Giacomo Degli Esposti - pad2369 AT iperbole DOT bologna DOT it