<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: SDKs and Deployment Targets</title>
	<atom:link href="http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/</link>
	<description>Clark’s musings</description>
	<lastBuildDate>Fri, 26 Feb 2010 02:11:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: links for 2009-11-02 &#171; Amy G. Dala</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-1074</link>
		<dc:creator>links for 2009-11-02 &#171; Amy G. Dala</dc:creator>
		<pubDate>Mon, 02 Nov 2009 14:02:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-1074</guid>
		<description>[...] Clarkcox.com » Blog Archive » SDKs and Deployment Targets (tags: iphone development reference) [...]</description>
		<content:encoded><![CDATA[<p>[...] Clarkcox.com » Blog Archive » SDKs and Deployment Targets (tags: iphone development reference) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benjohn</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-447</link>
		<dc:creator>Benjohn</dc:creator>
		<pubDate>Wed, 22 Jul 2009 11:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-447</guid>
		<description>Thanks for this brilliantly useful info, I think my users are likely to appreciate it too. Some additional magic sauce that I&#039;ve just found is that you need to weakly link in the &quot;base sdk&quot; frameworks that may not exist on the &quot;deployment platform&quot;. You can read how to do that here: http://blog.dearprakash.com/2009/06/20/iprogrammer-tip-6-weak-linking-additional-libraries/

Thanks again! - Benjohn</description>
		<content:encoded><![CDATA[<p>Thanks for this brilliantly useful info, I think my users are likely to appreciate it too. Some additional magic sauce that I&#8217;ve just found is that you need to weakly link in the &#8220;base sdk&#8221; frameworks that may not exist on the &#8220;deployment platform&#8221;. You can read how to do that here: <a href="http://blog.dearprakash.com/2009/06/20/iprogrammer-tip-6-weak-linking-additional-libraries/" rel="nofollow">http://blog.dearprakash.com/2009/06/20/iprogrammer-tip-6-weak-linking-additional-libraries/</a></p>
<p>Thanks again! &#8211; Benjohn</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Emanuele Vulcano</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-300</link>
		<dc:creator>Emanuele Vulcano</dc:creator>
		<pubDate>Thu, 02 Jul 2009 13:04:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-300</guid>
		<description>The correct way to prevent a compiler from optimizing away, anyway, is to use volatile. Otherwise, a cunning compiler may infer (and is allowed to) optimize away the use of fn.</description>
		<content:encoded><![CDATA[<p>The correct way to prevent a compiler from optimizing away, anyway, is to use volatile. Otherwise, a cunning compiler may infer (and is allowed to) optimize away the use of fn.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Hanson</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-293</link>
		<dc:creator>Chris Hanson</dc:creator>
		<pubDate>Wed, 01 Jul 2009 19:10:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-293</guid>
		<description>@Chris Suter: The compiler should only emit a warning for that if the declaration of APIForAmazingNewFeature isn&#039;t tagged with `__attribute__((weak_import))`, which is what indicates to the compiler that it can be NULL; otherwise, assuming that functions aren&#039;t NULL is a valid optimization.

This attribute (and `__attribute__((unavailable))` of course) are what the macros in AvailabilityMacros.h (old) and Availability.h (new) are for; they&#039;re set up to tag declarations with the appropriate attributes based on the combination of minimum required (deployment target) and maximum allowed (SDK) OS that you&#039;ve chosen.</description>
		<content:encoded><![CDATA[<p>@Chris Suter: The compiler should only emit a warning for that if the declaration of APIForAmazingNewFeature isn&#8217;t tagged with `__attribute__((weak_import))`, which is what indicates to the compiler that it can be NULL; otherwise, assuming that functions aren&#8217;t NULL is a valid optimization.</p>
<p>This attribute (and `__attribute__((unavailable))` of course) are what the macros in AvailabilityMacros.h (old) and Availability.h (new) are for; they&#8217;re set up to tag declarations with the appropriate attributes based on the combination of minimum required (deployment target) and maximum allowed (SDK) OS that you&#8217;ve chosen.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Ryland</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-247</link>
		<dc:creator>Chris Ryland</dc:creator>
		<pubDate>Thu, 25 Jun 2009 18:40:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-247</guid>
		<description>@Chris Suter: Yes, but the new static analysis clang-based engine Xcode 3.2 would probably see those two as identical, and still give you a warning. I wonder if there&#039;s a better way.</description>
		<content:encoded><![CDATA[<p>@Chris Suter: Yes, but the new static analysis clang-based engine Xcode 3.2 would probably see those two as identical, and still give you a warning. I wonder if there&#8217;s a better way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cédric Luthi</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-245</link>
		<dc:creator>Cédric Luthi</dc:creator>
		<pubDate>Thu, 25 Jun 2009 14:51:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-245</guid>
		<description>Also good to know: the SDKROOT setting translates to gcc&#039;s -isysroot option, MACOSX_DEPLOYMENT_TARGET to -mmacosx-version-min and IPHONEOS_DEPLOYMENT_TARGET to -miphoneos-version-min.</description>
		<content:encoded><![CDATA[<p>Also good to know: the SDKROOT setting translates to gcc&#8217;s -isysroot option, MACOSX_DEPLOYMENT_TARGET to -mmacosx-version-min and IPHONEOS_DEPLOYMENT_TARGET to -miphoneos-version-min.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Suter</title>
		<link>http://www.clarkcox.com/blog/2009/06/23/sdks-and-deployment-targets/comment-page-1/#comment-233</link>
		<dc:creator>Chris Suter</dc:creator>
		<pubDate>Wed, 24 Jun 2009 00:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.clarkcox.com/blog/?p=108#comment-233</guid>
		<description>One of the newer compilers (probably clang, but possible gcc-llvm—I forget), spews a warning when you do:

    if(APIForAmazingNewFeature != NULL) {

The warning complains that the test is always TRUE, which suggests, although I haven’t checked, that it’s getting optimised away.

The warning appears to go away if you do:

    fn = APIForAmazingNewFeature;
    if (fn) {
       // Do amazing stuff
    }</description>
		<content:encoded><![CDATA[<p>One of the newer compilers (probably clang, but possible gcc-llvm—I forget), spews a warning when you do:</p>
<p>    if(APIForAmazingNewFeature != NULL) {</p>
<p>The warning complains that the test is always TRUE, which suggests, although I haven’t checked, that it’s getting optimised away.</p>
<p>The warning appears to go away if you do:</p>
<p>    fn = APIForAmazingNewFeature;<br />
    if (fn) {<br />
       // Do amazing stuff<br />
    }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
