<?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 for Embedded in Academia</title>
	<atom:link href="http://blog.regehr.org/comments/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.regehr.org</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 05:34:36 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on C99 Language Lawyer Needed by regehr</title>
		<link>http://blog.regehr.org/archives/681/comment-page-1#comment-3937</link>
		<dc:creator>regehr</dc:creator>
		<pubDate>Tue, 07 Feb 2012 05:34:36 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=681#comment-3937</guid>
		<description>Michael, agreed!

Pascal, when I last spent quality time with the C++11 document I took away that:

- Much of the &quot;sequenced before&quot; and &quot;sequenced after&quot; language in the memory model applies both to inter-thread and intra-thread sequencing

- It is clearly intended that unsynchronized accesses to adjascent bitfields race

Of course I could be wrong in the details and will need to dig in again...</description>
		<content:encoded><![CDATA[<p>Michael, agreed!</p>
<p>Pascal, when I last spent quality time with the C++11 document I took away that:</p>
<p>- Much of the &#8220;sequenced before&#8221; and &#8220;sequenced after&#8221; language in the memory model applies both to inter-thread and intra-thread sequencing</p>
<p>- It is clearly intended that unsynchronized accesses to adjascent bitfields race</p>
<p>Of course I could be wrong in the details and will need to dig in again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C99 Language Lawyer Needed by Michael Norrish</title>
		<link>http://blog.regehr.org/archives/681/comment-page-1#comment-3936</link>
		<dc:creator>Michael Norrish</dc:creator>
		<pubDate>Tue, 07 Feb 2012 05:24:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=681#comment-3936</guid>
		<description>Bitfields: just say no.</description>
		<content:encoded><![CDATA[<p>Bitfields: just say no.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on C99 Language Lawyer Needed by Pascal Cuoq</title>
		<link>http://blog.regehr.org/archives/681/comment-page-1#comment-3935</link>
		<dc:creator>Pascal Cuoq</dc:creator>
		<pubDate>Tue, 07 Feb 2012 05:22:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=681#comment-3935</guid>
		<description>Even in C11, the reasoning is slightly tenuous. Here is what paragraph 3 in 3.14 says:

NOTE 2	A bit-field and an adjacent non-bit-field member are in separate memory locations. The same applies to two bit-fields, if one is declared inside a nested structure declaration and the other is not, or if the two are separated by a zero-length bit-field declaration, or if they are separated by a non-bit-field member declaration. It is not safe to concurrently update two non-atomic bit-fields in the same structure if all members declared between them are also (non-zero-length) bit-fields, no matter what the sizes of those intervening bit-fields happen to be.

It says nothing about sequence points, only about concurrency.

Paragraph 2 in 6.5 says:

If a side effect on a scalar object is unsequenced relative to either a different side effect on the same scalar object or a value computation using the value of the same scalar object, the behavior is undefined. [...]

This paragraph only speaks of scalar objects. A bit-field is not a scalar object. The meaning in 6.5 paragraph 2 would be clearer if it used “memory location” in place of “scalar object”, since “memory location” stands for “scalar object or contiguous sequence of bit-fields”.

With the current formulation, we can only infer that the intention was to forbid the posted program from the fact that unsequenced updates to the same bit-field are clearly forbidden. Technically speaking, 6.5:2 does not apply to bit-fields.</description>
		<content:encoded><![CDATA[<p>Even in C11, the reasoning is slightly tenuous. Here is what paragraph 3 in 3.14 says:</p>
<p>NOTE 2	A bit-field and an adjacent non-bit-field member are in separate memory locations. The same applies to two bit-fields, if one is declared inside a nested structure declaration and the other is not, or if the two are separated by a zero-length bit-field declaration, or if they are separated by a non-bit-field member declaration. It is not safe to concurrently update two non-atomic bit-fields in the same structure if all members declared between them are also (non-zero-length) bit-fields, no matter what the sizes of those intervening bit-fields happen to be.</p>
<p>It says nothing about sequence points, only about concurrency.</p>
<p>Paragraph 2 in 6.5 says:</p>
<p>If a side effect on a scalar object is unsequenced relative to either a different side effect on the same scalar object or a value computation using the value of the same scalar object, the behavior is undefined. [...]</p>
<p>This paragraph only speaks of scalar objects. A bit-field is not a scalar object. The meaning in 6.5 paragraph 2 would be clearer if it used “memory location” in place of “scalar object”, since “memory location” stands for “scalar object or contiguous sequence of bit-fields”.</p>
<p>With the current formulation, we can only infer that the intention was to forbid the posted program from the fact that unsequenced updates to the same bit-field are clearly forbidden. Technically speaking, 6.5:2 does not apply to bit-fields.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Randomly Testing a Static Analyzer by regehr</title>
		<link>http://blog.regehr.org/archives/680/comment-page-1#comment-3907</link>
		<dc:creator>regehr</dc:creator>
		<pubDate>Fri, 03 Feb 2012 17:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=680#comment-3907</guid>
		<description>Hi Octoploid-  Sorry about that!  I&#039;ll commit a fix in a minute that makes c_delta auto-detect whether clang_delta is available.

clang_delta is new and experimental, but works well already. Let me see what I can do to get it out there. Its in our internal SVN now, maybe we should just move it to github.</description>
		<content:encoded><![CDATA[<p>Hi Octoploid-  Sorry about that!  I&#8217;ll commit a fix in a minute that makes c_delta auto-detect whether clang_delta is available.</p>
<p>clang_delta is new and experimental, but works well already. Let me see what I can do to get it out there. Its in our internal SVN now, maybe we should just move it to github.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Randomly Testing a Static Analyzer by regehr</title>
		<link>http://blog.regehr.org/archives/680/comment-page-1#comment-3906</link>
		<dc:creator>regehr</dc:creator>
		<pubDate>Fri, 03 Feb 2012 17:57:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.regehr.org/?p=680#comment-3906</guid>
		<description>Whoops-- fixed in the article, thanks Pascal!</description>
		<content:encoded><![CDATA[<p>Whoops&#8211; fixed in the article, thanks Pascal!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

