<?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: Guest Article: Static Analysis in Medical Device Software (Part 1) &#8212; The Traps of C</title>
	<atom:link href="http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/</link>
	<description>Software Development and Biomedical Engineering</description>
	<lastBuildDate>Wed, 08 Sep 2010 06:37:34 -0400</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Guest Article: Static Analysis in Medical Device Software (Part 3) — Formal specifications &#124; Bob on Medical Device Software</title>
		<link>http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/comment-page-1/#comment-2637</link>
		<dc:creator>Guest Article: Static Analysis in Medical Device Software (Part 3) — Formal specifications &#124; Bob on Medical Device Software</dc:creator>
		<pubDate>Tue, 09 Mar 2010 15:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://rdn-consulting.com/blog/?p=267#comment-2637</guid>
		<description>[...] Cuoq at Frama-C continues his discussion of static analysis for medical device software. Also see Part 1 and Part [...]</description>
		<content:encoded><![CDATA[<p>[...] Cuoq at Frama-C continues his discussion of static analysis for medical device software. Also see Part 1 and Part [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pascal Cuoq</title>
		<link>http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/comment-page-1/#comment-1671</link>
		<dc:creator>Pascal Cuoq</dc:creator>
		<pubDate>Sat, 06 Jun 2009 07:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://rdn-consulting.com/blog/?p=267#comment-1671</guid>
		<description>Anonymous is right in his message message of June 5, 6:37pm.
Reading the value of an uninitialized variable is clearly marked
as &quot;undefined&quot; behavior in the standard, that I did not have handy
at the time I was writing this. I did not want all
my unspecifiedness examples to be about pointers, but
I should have kept digging for another example.

While on this subject, one more remark: the standard does not
force the compiler to detect and report undefined behaviors
even when it would be possible, or even easy, to do so.
Someone&#039;s first impression regarding the mentioned 
wrong behavior of the evaluation of (L-L) reading from
a nonexistent stack frame could be that this only happens
in cases where the compiler can easily detect that L
certainly is accessed uninitialized. Maybe so (I still have
to think about it) but the compiler DOESN&#039;T HAVE TO detect it
(according to the standard anyway).

Pascal Cuoq</description>
		<content:encoded><![CDATA[<p>Anonymous is right in his message message of June 5, 6:37pm.<br />
Reading the value of an uninitialized variable is clearly marked<br />
as &#8220;undefined&#8221; behavior in the standard, that I did not have handy<br />
at the time I was writing this. I did not want all<br />
my unspecifiedness examples to be about pointers, but<br />
I should have kept digging for another example.</p>
<p>While on this subject, one more remark: the standard does not<br />
force the compiler to detect and report undefined behaviors<br />
even when it would be possible, or even easy, to do so.<br />
Someone&#8217;s first impression regarding the mentioned<br />
wrong behavior of the evaluation of (L-L) reading from<br />
a nonexistent stack frame could be that this only happens<br />
in cases where the compiler can easily detect that L<br />
certainly is accessed uninitialized. Maybe so (I still have<br />
to think about it) but the compiler DOESN&#8217;T HAVE TO detect it<br />
(according to the standard anyway).</p>
<p>Pascal Cuoq</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/comment-page-1/#comment-1668</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Sat, 06 Jun 2009 02:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://rdn-consulting.com/blog/?p=267#comment-1668</guid>
		<description>&gt; The “uninitialized variable” example in the list of undesirable behaviors in the article is in fact an example of unspecified behavior.

Not in C or C++, it isn&#039;t. Trying to read the value of an uninitialized variable yields undefined behavior, not unspecified behavior. In your example, L has no value --- not &quot;some value, but I&#039;m not sure which&quot; --- *NO* value.

The dangers of reading uninitialized variables should be pretty obvious to anyone who&#039;s ever taken a compiler-construction course in which &quot;liveness analysis&quot; was mentioned. It&#039;s simply not the case that (L-L) will evaluate to zero; it might evaluate to something else, or it might even try to read a value off the nonexistent stack frame and cause a hardware fault.</description>
		<content:encoded><![CDATA[<p>&gt; The “uninitialized variable” example in the list of undesirable behaviors in the article is in fact an example of unspecified behavior.</p>
<p>Not in C or C++, it isn&#8217;t. Trying to read the value of an uninitialized variable yields undefined behavior, not unspecified behavior. In your example, L has no value &#8212; not &#8220;some value, but I&#8217;m not sure which&#8221; &#8212; *NO* value.</p>
<p>The dangers of reading uninitialized variables should be pretty obvious to anyone who&#8217;s ever taken a compiler-construction course in which &#8220;liveness analysis&#8221; was mentioned. It&#8217;s simply not the case that (L-L) will evaluate to zero; it might evaluate to something else, or it might even try to read a value off the nonexistent stack frame and cause a hardware fault.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guest Article: Static Analysis in Medical Device Software (Part 2) — Methodology &#124; Bob on Medical Device Software</title>
		<link>http://rdn-consulting.com/blog/2009/05/15/guest-article-static-analysis-in-medical-device-software-part-1-the-traps-of-c/comment-page-1/#comment-1661</link>
		<dc:creator>Guest Article: Static Analysis in Medical Device Software (Part 2) — Methodology &#124; Bob on Medical Device Software</dc:creator>
		<pubDate>Thu, 04 Jun 2009 23:41:41 +0000</pubDate>
		<guid isPermaLink="false">http://rdn-consulting.com/blog/?p=267#comment-1661</guid>
		<description>[...] Pascal Cuoq at Frama-C continues his discussion of static analysis for medical device software. This is part 2 of 3. Part 1 is here. [...]</description>
		<content:encoded><![CDATA[<p>[...] Pascal Cuoq at Frama-C continues his discussion of static analysis for medical device software. This is part 2 of 3. Part 1 is here. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>