delorie.com/archives/browse.cgi | search |
From: | dje AT canuck DOT cygnus DOT com (Doug Evans) |
Subject: | Re: one point (Was [Re: FW: Re: wxwin port]) |
18 Nov 1996 21:27:34 -0800 : | |
Sender: | daemon AT cygnus DOT com |
Approved: | cygnus DOT gnu-win32 AT cygnus DOT com |
Distribution: | cygnus |
Message-ID: | <199611190108.RAA05782.cygnus.gnu-win32@canuck.cygnus.com> |
Original-To: | scottc AT net-community DOT com |
Original-CC: | garp AT opustel DOT com, gnu-win32 AT cygnus DOT com |
In-reply-to: | <199611181259.EAA32405@stetson.net-community.com> (message from |
Scott Christley on Mon, 18 Nov 1996 04: 59:56 -0800) | |
Original-Sender: | owner-gnu-win32 AT cygnus DOT com |
Date: Mon, 18 Nov 1996 04:59:56 -0800 From: Scott Christley <scottc AT net-community DOT com> I've run across this problem with some other structures. It appears that GCC will automatically align the size of some variables in order to eek out more performance. I don't believe this assessment can be correct. If GCC doesn't align structures [by default] the way the native compiler does, then that is a bug, end of story. A WORD, which is an unsigned short, should be 16 bits but GCC will pad it out to a full 32 bits which is presumably more efficient to pass. I've noticed this in structures which have an odd number of WORD variables as the BITMAPFILEHEADER structure below. When there is an even number of WORD variables then GCC appears to pack both into 32 bits. - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |