Re: Alignment in structs
Re: Alignment in structs
- Subject: Re: Alignment in structs
- From: "Sean McBride" <email@hidden>
- Date: Mon, 17 Jul 2006 11:16:52 -0400
- Organization: Rogue Research
On 2006-07-14 19:41, Laurence Harris said:
>> #pragma pack(2)
>>
>> typedef struct Blah {
>> UInt32 a, b, c;
>> SInt16 d;
>> } Blah;
>>
>> #pragma pack()
>>
>> Hope this helps,
>
>Thanks. Now, would I see padding issues with this as well:
>
>typedef struct Blah {
> SInt16 d;
> UInt32 a, b, c;
>} Blah;
BTW, you can use the -Wpadded warning to have gcc tell you when it pads
structs. Annoying to have on all the time, but useful if you're
switching compilers I guess.
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden