Author: Russell Reagan
Date: 18:44:41 12/05/03
Go up one level in this thread
On December 05, 2003 at 21:24:19, Robert Hyatt wrote:
>I have a structure that looks like this:
>
>struct BOOK_POSITION {
> long long signature;
> unsigned int status;
> float learn;
> int CAP;
>}
>
>sizeof(above) gives 20 on my dual xeon, 24 on the
>opteron. I'd like to make it 20 so that my binary book
>can be shared between the opteron and the rest of the
>intel world.
>
>Is there a reasonably portable way to fix this???
>
>(note the long long becomes a long on the opteron, the rest
>are not changed.)
The -fpack-struct option seems to do the trick, but I think it will probably
remove any padding for all structs, which might not be a good thing overall.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.