• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Alignment pragmas?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alignment pragmas?


  • Subject: Alignment pragmas?
  • From: "Blair M. Burtan" <email@hidden>
  • Date: Sun, 11 Mar 2007 12:45:20 -0700

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Alignment pragmas?
      • From: Rua Haszard Morris <email@hidden>
    • Re: Alignment pragmas?
      • From: Rua Haszard Morris <email@hidden>
  • Prev by Date: Does exists something as CURRENT_EXECUTABLE_PATH ?
  • Next by Date: Re: Alignment pragmas?
  • Previous by thread: Re: Does exists something as CURRENT_EXECUTABLE_PATH ?
  • Next by thread: Re: Alignment pragmas?
  • Index(es):
    • Date
    • Thread