• 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
Re: 1 byte struct alignment in gcc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 1 byte struct alignment in gcc?


  • Subject: Re: 1 byte struct alignment in gcc?
  • From: Shawn Erickson <email@hidden>
  • Date: Tue, 13 Jul 2004 18:36:11 -0700

On Jul 13, 2004, at 6:19 PM, Satoshi Yamamoto wrote:

We have structs that needs to be aligned to 1 byte. In codewarrior, we were
using "#pragma options align=packed". Is there an equivalent pragma in gcc?
It seems like only "mac68k" and "power" are supported.


I've also found that you can use "__attribute__ ((packed))", but we are
hoping not to add this to every field in all the structs we got. Or is this
the only way to accomplish this in gcc?

It looks like I am using "#pragma pack(1)" and "#pragma pack()" to do this in my KEXT code (compiled with Xcode).


-Shawn
_______________________________________________
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.


References: 
 >1 byte struct alignment in gcc? (From: email@hidden (Satoshi Yamamoto))

  • Prev by Date: 1 byte struct alignment in gcc?
  • Next by Date: Maya 6 And Xcode
  • Previous by thread: 1 byte struct alignment in gcc?
  • Next by thread: Maya 6 And Xcode
  • Index(es):
    • Date
    • Thread