Re: Adress of function
Re: Adress of function
- Subject: Re: Adress of function
- From: Chris Espinosa <email@hidden>
- Date: Sun, 19 Feb 2006 19:28:37 -0800
On Feb 19, 2006, at 11:54 AM, Jan E. Schotsman wrote: I have some old code that checks for the presence of a library by checking that a function pointer is non-nil. In XCode I always get the message "The address of function foo will always evaluate to true". Can anybody shed some light on this?
This will be true unless you are using an SDK and have the Deployment Version set to a lower version than the SDK you're using, or are weak-importing an entire library or framework. If those conditions are not met, then any condition that would cause the symbol to be missing would cause the program not to bind at launch and never get to your code, so GCC optimizes the test to true.
If you think your configuration should be weak-binding to a symbol, please post the "CompileC" invocation line where you get the error.
Chris |
_______________________________________________
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