<?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: Is MISRA compliance worthwhile?</title>
	<atom:link href="http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/feed/" rel="self" type="application/rss+xml" />
	<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/</link>
	<description>Thoughts on embedded systems by Nigel Jones</description>
	<lastBuildDate>Sun, 06 May 2012 10:34:02 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: ghee</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-309</link>
		<dc:creator>ghee</dc:creator>
		<pubDate>Sat, 09 Jan 2010 01:50:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-309</guid>
		<description>I could not make PC-lint calculate offsetof() at analysis time.  But I did not see MISRA&#039;s reason for banning offsetof() either.</description>
		<content:encoded><![CDATA[<p>I could not make PC-lint calculate offsetof() at analysis time.  But I did not see MISRA&#39;s reason for banning offsetof() either.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-308</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Thu, 15 Oct 2009 12:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-308</guid>
		<description>No, I hope someone else will take up the challenge. I agree with your assessment of MISRA C. Understanding the reasoning behind the MISRA rules is a great way to learn about some of the pitfalls of C. It is worth noting that a significant number of rules address behavior that it undefined, unspecified or implementation dependent. The first two categories are broadly covered by rule 1.2, but many cases are explicitly addressed by other rules. When it comes to MISRA compliance checking, the main issues are interpretation of the rules and validation of the checker. For these reasons, I think that anyone who is serious about MISRA C should take care in selecting the tool used for checking compliance. For example, PC-Lint 8.00v flags violation of rule 10.1 whenever an unsigned integer is compared with a zero constant. The reason is “Prohibited Implicit Conversion: Signed versus Unsigned”. This may result from a literal interpretation of the rule but it doesn’t make sense. I doubt most programmers would want to add a U suffix to a constant zero so perhaps rule 10.1 could end up being disabled in order to avoid the noise. On the other hand, rule 10.6, which is not currently supported by PC-lint, mandates that a “U” suffix be applied to all constants of unsigned type. IMO this rule falls into the category of “treats you like a child” but there is an important message that underlies the rule. The difference is that PC-Lint [w/o MISRA] will attempt to warn of specific instances that will or may cause a problem whilst MISRA C mandates a very general rule even though only a few instances may cause a problem. Les Hatton [http://www.leshatton.org/index_SA.html] has a lot to say about safer C subsets and has talked about the risk of introducing new defects when trying to “fix” software for “noisy” rules.</description>
		<content:encoded><![CDATA[<p>No, I hope someone else will take up the challenge. I agree with your assessment of MISRA C. Understanding the reasoning behind the MISRA rules is a great way to learn about some of the pitfalls of C. It is worth noting that a significant number of rules address behavior that it undefined, unspecified or implementation dependent. The first two categories are broadly covered by rule 1.2, but many cases are explicitly addressed by other rules. When it comes to MISRA compliance checking, the main issues are interpretation of the rules and validation of the checker. For these reasons, I think that anyone who is serious about MISRA C should take care in selecting the tool used for checking compliance. For example, PC-Lint 8.00v flags violation of rule 10.1 whenever an unsigned integer is compared with a zero constant. The reason is “Prohibited Implicit Conversion: Signed versus Unsigned”. This may result from a literal interpretation of the rule but it doesn’t make sense. I doubt most programmers would want to add a U suffix to a constant zero so perhaps rule 10.1 could end up being disabled in order to avoid the noise. On the other hand, rule 10.6, which is not currently supported by PC-lint, mandates that a “U” suffix be applied to all constants of unsigned type. IMO this rule falls into the category of “treats you like a child” but there is an important message that underlies the rule. The difference is that PC-Lint [w/o MISRA] will attempt to warn of specific instances that will or may cause a problem whilst MISRA C mandates a very general rule even though only a few instances may cause a problem. Les Hatton [http://www.leshatton.org/index_SA.html] has a lot to say about safer C subsets and has talked about the risk of introducing new defects when trying to “fix” software for “noisy” rules.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-307</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Wed, 14 Oct 2009 11:00:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-307</guid>
		<description>That&#039;s very interesting to know Michael. Although I&#039;m a huge fan of PC-Lint, I don&#039;t actually use it for MISRA checking, as the compiler I use has it built in. It would be interesting to know what Gimpel thinks of this. Did you happen to mention this to them?</description>
		<content:encoded><![CDATA[<p>That&#39;s very interesting to know Michael. Although I&#39;m a huge fan of PC-Lint, I don&#39;t actually use it for MISRA checking, as the compiler I use has it built in. It would be interesting to know what Gimpel thinks of this. Did you happen to mention this to them?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-306</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Wed, 14 Oct 2009 08:07:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-306</guid>
		<description>I agree that PC-Lint is good value for money but it would not be my first choice for checking MISRA compliance especially if compliance was mandated by a customer. Firstly the number of rules supported is low comparative to other tools [about 80% of the mandatory rules are “supported”], and secondly, PC-Lint seems to fail to detect non-compliance for some “supported” rules when checked against the MISRA Exemplar suite. For example, rules 5.6 and 5.7. Note this was my conclusion when testing with PC Lint 8.00v and the results have not been independently confirmed. My understanding is that existing PC-Lint checks have been mapped against MISRA rules rather than adding new checks and it would seem to have been less than precise.</description>
		<content:encoded><![CDATA[<p>I agree that PC-Lint is good value for money but it would not be my first choice for checking MISRA compliance especially if compliance was mandated by a customer. Firstly the number of rules supported is low comparative to other tools [about 80% of the mandatory rules are “supported”], and secondly, PC-Lint seems to fail to detect non-compliance for some “supported” rules when checked against the MISRA Exemplar suite. For example, rules 5.6 and 5.7. Note this was my conclusion when testing with PC Lint 8.00v and the results have not been independently confirmed. My understanding is that existing PC-Lint checks have been mapped against MISRA rules rather than adding new checks and it would seem to have been less than precise.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nigel Jones</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-305</link>
		<dc:creator>Nigel Jones</dc:creator>
		<pubDate>Mon, 12 Oct 2009 16:47:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-305</guid>
		<description>If you turn MISRA checking on with PC-Lint, then it obviously checks a superset of the MISRA rules. However without MISRA checking turned on, then it uses a set of rules that are of course a little different. I guess the way I see it is this (where in the description below, Lint is configured so as to not perform MISRA checking):Code can be &#039;Lint free&#039; but not &#039;MISRA free&#039;. Code may be &#039;MISRA free&#039; but not &#039;Lint free&#039;. Clearly it can also be both &#039;Lint free&#039; and &#039;MISRA free&#039;. Thus the question is, of these three possibilities, which ensures the best code quality? I think many folks would be tempted to say both &#039;Lint &amp; MISRA free&#039;. I guess my point is that I don&#039;t think that&#039;s always the case - and that Lint free is sometimes better.</description>
		<content:encoded><![CDATA[<p>If you turn MISRA checking on with PC-Lint, then it obviously checks a superset of the MISRA rules. However without MISRA checking turned on, then it uses a set of rules that are of course a little different. I guess the way I see it is this (where in the description below, Lint is configured so as to not perform MISRA checking):Code can be &#39;Lint free&#39; but not &#39;MISRA free&#39;. Code may be &#39;MISRA free&#39; but not &#39;Lint free&#39;. Clearly it can also be both &#39;Lint free&#39; and &#39;MISRA free&#39;. Thus the question is, of these three possibilities, which ensures the best code quality? I think many folks would be tempted to say both &#39;Lint &amp; MISRA free&#39;. I guess my point is that I don&#39;t think that&#39;s always the case &#8211; and that Lint free is sometimes better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Harris</title>
		<link>http://embeddedgurus.com/stack-overflow/2009/10/is-misra-compliance-worthwhile/comment-page-1/#comment-304</link>
		<dc:creator>Tom Harris</dc:creator>
		<pubDate>Mon, 12 Oct 2009 15:32:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.gfcdev.org/test-stack/2009/10/07/is-misra-compliance-worthwhile/#comment-304</guid>
		<description>Your guidance about how to apply -- and make exceptions to -- a coding standard, and how to use PC-lint, make sense to me.But I don&#039;t understand why you describe PC-lint as an &lt;i&gt;alternative&lt;/i&gt; to MISRA compliance. Gimpel Software provides a PC-lint configuration file (au-misra2.lnt) which maps as many MISRA rules as possible to PC-lint rules, but lets you both subtract MISRA rules, and add additional PC-lint rules directly.Could you clarify what you meant?</description>
		<content:encoded><![CDATA[<p>Your guidance about how to apply &#8212; and make exceptions to &#8212; a coding standard, and how to use PC-lint, make sense to me.But I don&#39;t understand why you describe PC-lint as an <i>alternative</i> to MISRA compliance. Gimpel Software provides a PC-lint configuration file (au-misra2.lnt) which maps as many MISRA rules as possible to PC-lint rules, but lets you both subtract MISRA rules, and add additional PC-lint rules directly.Could you clarify what you meant?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

