• 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: Miscellaneous XCode Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Miscellaneous XCode Questions


  • Subject: Re: Miscellaneous XCode Questions
  • From: Greg Guerin <email@hidden>
  • Date: Fri, 12 May 2006 17:39:38 -0700

Ben Weiss wrote:

>(envisioning the chaos that would ensue if compilers suddenly decided to
>enforce this...) If it's illegal C, why doesn't gcc generate an error (or
>at least a warning?)

It's legal C, from the source standpoint, but operand alignment
requirements of any recast pointers are entirely machine-dependent.  This
has always been true of C code.  I bet it's even written into the standard,
though I can't cite chapter and verse.

Going from a smaller or less-aligned type to a larger or aligned type
always requires that the author of the code know about and handle any
operand alignment restrictions.  It's one of the funnest things to track
down and fix when porting code from an unaligned CPU (e.g. classical x86)
to any CPU with operand alignment restrictions (e.g. many non-x86).

  -- GG


 _______________________________________________
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

  • Prev by Date: Re: Debugging static library used by a plugin?
  • Next by Date: Re: Java 5 and WO problem
  • Previous by thread: Re: Miscellaneous XCode Questions
  • Next by thread: Re: Miscellaneous XCode Questions
  • Index(es):
    • Date
    • Thread