Re: Architecture setting: i386 in Release
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