Re: Alignment pragmas?
Re: Alignment pragmas?
- Subject: Re: Alignment pragmas?
- From: Rua Haszard Morris <email@hidden>
- Date: Mon, 12 Mar 2007 09:49:11 +1300
It supports the ones used in codewarrior (handy for us porters)...
#pragma options align=mac68k
or
#pragma options align=power
&
#pragma options align=reset
Also there are more gcc-native things, i think something like
#pragma pack(push,2)
#pragma pack(pop)
Have fun aligning your structures and finding the ones you forgot about.
Rua HM.
On Mar 12, 2007, at 8:45 AM, Blair M. Burtan wrote:
Are there any alignment pragmas in Xcode/GCC like there were in
Codewarrior?
Something I'm trying to understand is why class instances get padded
differently. So far I've determined that the size of a class
instance is 4
bytes larger than the sum of the members' sizes. Let's say you
have a class
with 4 longs. Sizeof returns 20 bytes instead of 16. In
Codewarrior, that
size gets padded out to 24 bytes (evenly divisible by 8) but GCC
doesn't pad
it.
So the real question is: Is there a way to force GCC to pad things
out the
same way?
Blair M. Burtan
Northern Lights Productions
www.northernlights3D.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40adinstruments.com
This email sent to email@hidden
_______________________________________________
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