• 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: 4 vs 8 alignment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 4 vs 8 alignment


  • Subject: Re: 4 vs 8 alignment
  • From: Devang Patel <email@hidden>
  • Date: Wed, 13 Dec 2006 10:58:27 -0800


On Dec 13, 2006, at 8:05 AM, Sean McBride wrote:

On 2006-12-12 23:51, David Fang said:

e.g.
struct foo { int x; char y; } __attribute__((aligned));

I prefer __attribute__ over pragma for portability, but otherwise it may
just be a matter of taste.

How is __attribute__ more portable than pragma pack? Is it not a GNU extension? I know pragma pack is supported by gcc, CodeWarrior, and Visual Studio.

I am jumping into middle so pardon me. However, GCC manual says,

"GCC supports several types of pragmas, primarily in order to compile
code originally written for other compilers. Note that in general we do not
recommend the use of pragmas; See Function Attributes, for further
explanation."


http://gcc.gnu.org/onlinedocs/gcc-4.0.3/gcc/Pragmas.html#Pragmas

-
Devang

_______________________________________________
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


References: 
 >4 vs 8 alignment (From: "Paul Cummings" <email@hidden>)
 >Re: 4 vs 8 alignment (From: David Fang <email@hidden>)
 >Re: 4 vs 8 alignment (From: "Sean McBride" <email@hidden>)

  • Prev by Date: Re: Re: ___spin_lock
  • Next by Date: Re: Re: ___spin_lock
  • Previous by thread: Re: 4 vs 8 alignment
  • Next by thread: ERROR: No debug map or DWARF data was found to link.
  • Index(es):
    • Date
    • Thread