Mail Archives: djgpp/1999/10/21/13:26:19
On Thu, 21 Oct 1999, Fabrice LETE wrote:
> If I have:
>
> typedef struct FOO {
> short a; long b;
> };
>
> sizeof(FOO) give me 8...
>
> What can I do to avoid the problem
This is not a problem, this is due to alignment done by the compiler to
make the code faster.
See section 22.10 of the DJGPP FAQ list for more about this.
> (I guess it's a switch to use with the compiler...)?
There is a switch, but after you read the FAQ, you will see why it is
not recommended to use, except in some specific situations.
- Raw text -