| delorie.com/archives/browse.cgi | search |
| Date: | Mon, 18 Jun 2001 10:15:18 +0300 (IDT) |
| From: | Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> |
| X-Sender: | eliz AT is |
| To: | Lunar <lunarorb AT hn DOT vnn DOT vn> |
| cc: | djgpp AT delorie DOT com |
| Subject: | Re: BIG problem with structure alignment! |
| In-Reply-To: | <001101c0f7a6$837b46a0$cf10a2cb@lunar> |
| Message-ID: | <Pine.SUN.3.91.1010618101450.22931Q-100000@is> |
| MIME-Version: | 1.0 |
| 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 |
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.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |