Re: Interesting preprocessor code behavior
Re: Interesting preprocessor code behavior
- Subject: Re: Interesting preprocessor code behavior
- From: Greg Guerin <email@hidden>
- Date: Thu, 3 Jul 2008 10:54:25 -0700
Clark Cox wrote:
#if MY_UNDEFINED_SYMBOL == ONE
...etc...
The OP mentioned the problem was with #elif, which could be significant.
The OP did not mention which version of gcc was used, which could
also be significant.
It was also not mentioned what the order of operands for the fail-
case was. DEF==UNDEF could differ from UNDEF==DEF (and would be a bug).
FWIW, the classical way to avoid the problem is:
#if (defined(X) && ...expression involving X...)
-- 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