• 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: Architecture setting: i386 in Release
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Architecture setting: i386 in Release


  • Subject: Re: Architecture setting: i386 in Release
  • From: "Sean McBride" <email@hidden>
  • Date: Wed, 20 Jun 2007 11:27:10 -0400
  • Organization: Rogue Research

On 6/20/07 5:31 PM, Dirk Stegemann (Mailing-Lists) said:

>I always recommend not to use '#ifdef', but simply '#if' instead:
>
>#if __APPLE__
>   #if __LITTLE_ENDIAN__
>     ...
>   #elif __BIG_ENDIAN__
>     ...
>   #else
>     #error "undefined architecture"
>   #endif
>#endif
>
>That way, those macros which are defined to '0' and those which are
>not defined at all, are treated the same.

Usually.  But you are relying on undefined behaviour, and gcc will even
warn you if you do this (if you enable -Wundef).  The most correct thing
is either:

#ifdef foo

or

#if defined(foo) && (foo == bar)

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


 _______________________________________________
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: 
 >Architecture setting: i386 in Release (From: Calum Robertson <email@hidden>)
 >Re: Architecture setting: i386 in Release (From: "Sean McBride" <email@hidden>)
 >Re[2]: Architecture setting: i386 in Release (From: Peter Mulholland <email@hidden>)
 >Re: Re[2]: Architecture setting: i386 in Release (From: "Dirk Stegemann (Mailing-Lists)" <email@hidden>)

  • Prev by Date: Re: Re[2]: Architecture setting: i386 in Release
  • Next by Date: Thread Safety
  • Previous by thread: Re: Re[2]: Architecture setting: i386 in Release
  • Next by thread: Enabling Preferences
  • Index(es):
    • Date
    • Thread