Phong Nguyen <[EMAIL PROTECTED]> writes:
> Hi,
>
> I define a structure as follows:
>
> typedef struct
> {
> Char name[2];
> Char age;
> }
> InfoType;
>
> I expect that sizeof(InfoType) to be 3. However the
> compiler returned sizeof(InfoType) = 4 !!!!. Any
> suggestion? I guess that I have to change some of the
> compiler configuration but do not know how. Please
> advice. Thanks.
The dragonball architecture likes to be 16-bit-word aligned. It's not
surprising that the compiler pads a 3-byte struct to 4 bytes. This isn't
a bug, and you really shouldn't try to change the behavior.
--
Dave Carrigan ([EMAIL PROTECTED]) | Yow! First, I'm going to give
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | you all the ANSWERS to today's
Seattle, WA, USA | test.. So just plug in your SONY
http://www.rudedog.org/ | WALKMANS and relax!!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/