Re: byte alignment
Re: byte alignment
- Subject: Re: byte alignment
- From: Kaelin Colclasure <email@hidden>
- Date: Tue, 29 Jun 2004 16:11:50 -0700
On Jun 29, 2004, at 3:23 PM, Markian Hlynka wrote:
I'm pretty sure that at some point I had code like this:
typedef struct
{
unsigned char sr : 3; //sourcerow
unsigned char sc : 3; //sourcecol
unsigned char dr : 3; //destrow
unsigned char dc : 3; //destcol
unsigned char capture : 3; //capture flag; 0 for regular, 1 for
capture.
} Ply_T;
Try replacing 'unsigned char' with simply 'unsigned'.
-- Kaelin
but for some reason, sizeof(Ply_T) is returning 3. I think it should be
2. My only explanation is byte alignments. Where in xcode can I change
the complier setting to turn OFF byte alignment? This will cause me
some extremely undesirable behaviour!
Thanks,
Markian
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.