<?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>「萬惡的未定義行為」的迴響</title>
	<atom:link href="http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/</link>
	<description>Victor&#039;s個人部落格，關於程式設計與小提琴</description>
	<lastBuildDate>Fri, 10 Feb 2012 08:55:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>由：键盘农夫</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-42369</link>
		<dc:creator>键盘农夫</dc:creator>
		<pubDate>Sat, 19 Nov 2011 04:44:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-42369</guid>
		<description>同意幻の上帝的看法
这个地方很微妙
printf(&quot;%d %d %d\n&quot;, n++,n++,n++);
是Undefined behavior 
然而
printf(&quot;%d %d %d\n&quot;, changeNum(&amp;n), changeNum(&amp;n), changeNum(&amp;n));
却是unspecified behavior</description>
		<content:encoded><![CDATA[<p>同意幻の上帝的看法<br />
这个地方很微妙<br />
printf("%d %d %d\n", n++,n++,n++);<br />
是Undefined behavior<br />
然而<br />
printf("%d %d %d\n", changeNum(&amp;n), changeNum(&amp;n), changeNum(&amp;n));<br />
却是unspecified behavior</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：dave</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-42294</link>
		<dc:creator>dave</dc:creator>
		<pubDate>Fri, 18 Nov 2011 11:41:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-42294</guid>
		<description>从CU追踪过来。最近语法帖子很火</description>
		<content:encoded><![CDATA[<p>从CU追踪过来。最近语法帖子很火</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：幻の上帝</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-42290</link>
		<dc:creator>幻の上帝</dc:creator>
		<pubDate>Fri, 18 Nov 2011 10:52:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-42290</guid>
		<description>#include 
 
int changeNum(int *n) {
    ++*n;
    return*n;
}
 
int main(int argc, char **argv) {
    int n = 0;
    printf(&quot;%d %d %d\n&quot;, changeNum(&amp;n), changeNum(&amp;n), changeNum(&amp;n));
    system(&quot;pause&quot;);
    return 0;
}
↑No undefined behavior here. The evaluation order of arguements is unspecified behavior, not undefined. And there is a sequence point before each function calling, so no object is modified more than once between two sequence points.
Undefined behavior shall be always wrong, while unspecified behavior can be right.</description>
		<content:encoded><![CDATA[<p>#include </p>
<p>int changeNum(int *n) {<br />
    ++*n;<br />
    return*n;<br />
}</p>
<p>int main(int argc, char **argv) {<br />
    int n = 0;<br />
    printf("%d %d %d\n", changeNum(&amp;n), changeNum(&amp;n), changeNum(&amp;n));<br />
    system("pause");<br />
    return 0;<br />
}<br />
↑No undefined behavior here. The evaluation order of arguements is unspecified behavior, not undefined. And there is a sequence point before each function calling, so no object is modified more than once between two sequence points.<br />
Undefined behavior shall be always wrong, while unspecified behavior can be right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：N.C</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-37464</link>
		<dc:creator>N.C</dc:creator>
		<pubDate>Wed, 19 Oct 2011 03:45:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-37464</guid>
		<description>這篇很不錯
我想請問changeNum(int *n)這個例子
應該是Unspecified behavior還是Undefined behavior呢?
我有點被搞混了
謝謝</description>
		<content:encoded><![CDATA[<p>這篇很不錯<br />
我想請問changeNum(int *n)這個例子<br />
應該是Unspecified behavior還是Undefined behavior呢?<br />
我有點被搞混了<br />
謝謝</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：madao</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-20245</link>
		<dc:creator>madao</dc:creator>
		<pubDate>Fri, 01 Jul 2011 15:20:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-20245</guid>
		<description>呵呵，还好lz发了这个，不然不知道要花多少力气在这之上呢。</description>
		<content:encoded><![CDATA[<p>呵呵，还好lz发了这个，不然不知道要花多少力气在这之上呢。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：++ problem in C &#171; Finalbug</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-4908</link>
		<dc:creator>++ problem in C &#171; Finalbug</dc:creator>
		<pubDate>Thu, 30 Dec 2010 08:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-4908</guid>
		<description>[...] think i find the answer, see this, and [...]</description>
		<content:encoded><![CDATA[<p>[...] think i find the answer, see this, and [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：未定义行为 : 米缸还有米</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-833</link>
		<dc:creator>未定义行为 : 米缸还有米</dc:creator>
		<pubDate>Thu, 17 Sep 2009 04:56:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-833</guid>
		<description>[...] 详细介绍 萬惡的未定義行為 [...]</description>
		<content:encoded><![CDATA[<p>[...] 详细介绍 萬惡的未定義行為 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Tetombo</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-447</link>
		<dc:creator>Tetombo</dc:creator>
		<pubDate>Sun, 03 May 2009 18:15:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-447</guid>
		<description>“除了參加國際C語言混亂代碼大賽的比賽選手，和台灣為了刁鑽而出題目的老師們，有誰會寫出這種會讓老闆開除你的程式碼？”
還有內地的啊…我大一的時候被未定義行為搞了個半死，現在每當提起它，就好像看鬼片一樣，說不出的詭異。</description>
		<content:encoded><![CDATA[<p>“除了參加國際C語言混亂代碼大賽的比賽選手，和台灣為了刁鑽而出題目的老師們，有誰會寫出這種會讓老闆開除你的程式碼？”<br />
還有內地的啊…我大一的時候被未定義行為搞了個半死，現在每當提起它，就好像看鬼片一樣，說不出的詭異。</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：deepking</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-138</link>
		<dc:creator>deepking</dc:creator>
		<pubDate>Sun, 08 Feb 2009 01:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-138</guid>
		<description>大一計概還是在考…
一開始也覺得這很厲害
當真得比較了解後
對這種題目非常不屑…</description>
		<content:encoded><![CDATA[<p>大一計概還是在考…<br />
一開始也覺得這很厲害<br />
當真得比較了解後<br />
對這種題目非常不屑…</p>
]]></content:encoded>
	</item>
	<item>
		<title>由：Daniel</title>
		<link>http://blog.ez2learn.com/2008/09/27/evil-undefined-behavior/comment-page-1/#comment-105</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Thu, 08 Jan 2009 12:18:44 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ez2learn.com/?p=3#comment-105</guid>
		<description>我的期中考9題output有大概5題都有這個東西吧...唉</description>
		<content:encoded><![CDATA[<p>我的期中考9題output有大概5題都有這個東西吧&#8230;唉</p>
]]></content:encoded>
	</item>
</channel>
</rss>

