<?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: Coding Standard Rule #9: Don&#8217;t Create Function-Like Macros</title>
	<atom:link href="http://embeddedgurus.com/barr-code/2009/04/coding-standard-rule-9-dont-create-function-like-macros/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/barr-code/2009/04/coding-standard-rule-9-dont-create-function-like-macros/</link>
	<description>A Blog by Michael Barr</description>
	<lastBuildDate>Fri, 18 May 2012 17:16:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ananth</title>
		<link>http://embeddedgurus.com/barr-code/2009/04/coding-standard-rule-9-dont-create-function-like-macros/comment-page-1/#comment-47</link>
		<dc:creator>ananth</dc:creator>
		<pubDate>Thu, 24 Sep 2009 18:53:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/04/03/coding-standard-rule-9-dont-create-function-like-macros/#comment-47</guid>
		<description>Hi Bryce,A newbie question. Why would a compiler not allow inline functions for the example that you have cited?   Explanation with some more detail would really help clarify the point further.Ananth</description>
		<content:encoded><![CDATA[<p>Hi Bryce,A newbie question. Why would a compiler not allow inline functions for the example that you have cited?   Explanation with some more detail would really help clarify the point further.Ananth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Barr</title>
		<link>http://embeddedgurus.com/barr-code/2009/04/coding-standard-rule-9-dont-create-function-like-macros/comment-page-1/#comment-46</link>
		<dc:creator>Michael Barr</dc:creator>
		<pubDate>Tue, 07 Apr 2009 20:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/04/03/coding-standard-rule-9-dont-create-function-like-macros/#comment-46</guid>
		<description>More info from Bryce (via e-mail exchange):A simple example would be conversions to a non-human-readable format at compile time, like:const int pitch_limit = DEG_2_BINCIRC( 10 );I don&#039;t think any compiler will let you use an inline function for that, which is why I have inline functions *and* function-style macros for things like fixed-point conversions and such. I suppose this is just one of those circumstances in which an inline function can&#039;t accomplish the same task, but it&#039;s a pretty significant one to me.</description>
		<content:encoded><![CDATA[<p>More info from Bryce (via e-mail exchange):A simple example would be conversions to a non-human-readable format at compile time, like:const int pitch_limit = DEG_2_BINCIRC( 10 );I don&#8217;t think any compiler will let you use an inline function for that, which is why I have inline functions *and* function-style macros for things like fixed-point conversions and such. I suppose this is just one of those circumstances in which an inline function can&#8217;t accomplish the same task, but it&#8217;s a pretty significant one to me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryce Schober</title>
		<link>http://embeddedgurus.com/barr-code/2009/04/coding-standard-rule-9-dont-create-function-like-macros/comment-page-1/#comment-45</link>
		<dc:creator>Bryce Schober</dc:creator>
		<pubDate>Fri, 03 Apr 2009 15:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/04/03/coding-standard-rule-9-dont-create-function-like-macros/#comment-45</guid>
		<description>What about static and constant initializations that need to respond to various configurations at compile time? I would rather have function-style macros for that purpose than magic numbers. In fact, you can make function-style macros *almost* as safe as inline functions, but it does take a heck of a lot more work. And once you have (using local variables, manual type-checking, etc.), you won&#039;t be able to use it for static and constant initialization anymore.</description>
		<content:encoded><![CDATA[<p>What about static and constant initializations that need to respond to various configurations at compile time? I would rather have function-style macros for that purpose than magic numbers. In fact, you can make function-style macros *almost* as safe as inline functions, but it does take a heck of a lot more work. And once you have (using local variables, manual type-checking, etc.), you won&#8217;t be able to use it for static and constant initialization anymore.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

