Re: Interesting preprocessor code behavior
Re: Interesting preprocessor code behavior
- Subject: Re: Interesting preprocessor code behavior
- From: Bill Royds <email@hidden>
- Date: Thu, 3 Jul 2008 13:57:02 -0400
On 3-Jul-08, at 11:55 , Howard Moon wrote:
Preprocessor comparisons (like #if (A==B)) cannot be relied upon to
consistently pass OR fail if either symbol is undefined.
An undefined symbol has the value 0 when evaluated, so if A is
undefined, this expression depends on the value of B. It will NOT
evaluate to false consistently, but to the value of
#if (0 ==B)
which evaluates to true if B is defined and equal to 0 or B is
undefined as well.
_______________________________________________
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