• 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
gcc pragma pack() question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc pragma pack() question


  • Subject: gcc pragma pack() question
  • From: Stephane Huaulme <email@hidden>
  • Date: Sat, 5 Apr 2003 13:25:46 -0600

while compiling for MacOSX, with -mcpu=750 using gcc, I use the following statement in a header:

#pragma pack()

which, returns the fields packing in struct to the default setting for the target.

My problem is that I get 2 different results in 2 different compilations using the same #pragma, and I can't figure out what is affecting it. In one case a char uses 2 bytes inside a struct, while in the other the same char uses 4 bytes.

My question is: what statement / compile flags / etc can affect the size of a char in a struct after #pragma pack(). AFAIK, I'm using the very same set of compile flags in both cases.

thanks


stephane
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: gcc pragma pack() question
      • From: Stephane Huaulme <email@hidden>
  • Prev by Date: Re: Incomplete APIs
  • Next by Date: Re: What units are in effect when drawing?
  • Previous by thread: Re: cocoa-dev digest, Vol 2 #2166 - 14 msgs
  • Next by thread: Re: gcc pragma pack() question
  • Index(es):
    • Date
    • Thread