<?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>《GCC警告选项例解》的评论</title>
	<atom:link href="http://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/feed/" rel="self" type="application/rss+xml" />
	<link>https://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/</link>
	<description>一个程序员的心路历程</description>
	<lastBuildDate>Fri, 17 Apr 2026 15:31:53 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>作者：Go defer的C实现 &#124; 天天三国杀</title>
		<link>https://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/#comment-920</link>
		<dc:creator>Go defer的C实现 &#124; 天天三国杀</dc:creator>
		<pubDate>Sat, 30 Nov 2013 02:00:02 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/03/14/gcc%e8%ad%a6%e5%91%8a%e9%80%89%e9%a1%b9%e4%be%8b%e8%a7%a3/#comment-920</guid>
		<description>[...] 要想模拟defer，首先要考虑的一点那就是defer后的语句是在函数return之前执行的。在标准C中，我们无任何举措可以实现这些。要在 C中实现defer，势必要借用一些编译器扩展特性，比如Gcc的扩展。这里实验所使用的编译器是Gcc(4.6.3 (Ubuntu 12.04))。Gcc扩展支持-finstrument-functions编译选项，该选项可以在函数执行前后插入一段运行代码。在之前写过的一篇名 为“为函数添加enter和exit级trace”的文章中对此有较为详细的说明，这里我们还要用到这个扩展特性。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 要想模拟defer，首先要考虑的一点那就是defer后的语句是在函数return之前执行的。在标准C中，我们无任何举措可以实现这些。要在 C中实现defer，势必要借用一些编译器扩展特性，比如Gcc的扩展。这里实验所使用的编译器是Gcc(4.6.3 (Ubuntu 12.04))。Gcc扩展支持-finstrument-functions编译选项，该选项可以在函数执行前后插入一段运行代码。在之前写过的一篇名 为“为函数添加enter和exit级trace”的文章中对此有较为详细的说明，这里我们还要用到这个扩展特性。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：panda</title>
		<link>https://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/#comment-60</link>
		<dc:creator>panda</dc:creator>
		<pubDate>Tue, 29 Sep 2009 17:40:17 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/03/14/gcc%e8%ad%a6%e5%91%8a%e9%80%89%e9%a1%b9%e4%be%8b%e8%a7%a3/#comment-60</guid>
		<description>再请问一个问题：

对于这个函数：
void foo(unsigned short b)
{
     foo(b + 1);
}

如果打开-Wconversion后，始终会在foo(b + 1)那行上有warning, 有没有别的办法可以替换这个选项？或是绕过它？
因为我想保留&quot;有符号数和无符号数之间隐式转换&quot;的检查这个功能。</description>
		<content:encoded><![CDATA[<p>再请问一个问题：</p>
<p>对于这个函数：<br />
void foo(unsigned short b)<br />
{<br />
     foo(b + 1);<br />
}</p>
<p>如果打开-Wconversion后，始终会在foo(b + 1)那行上有warning, 有没有别的办法可以替换这个选项？或是绕过它？<br />
因为我想保留&quot;有符号数和无符号数之间隐式转换&quot;的检查这个功能。</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：panda</title>
		<link>https://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/#comment-61</link>
		<dc:creator>panda</dc:creator>
		<pubDate>Tue, 08 Sep 2009 12:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/03/14/gcc%e8%ad%a6%e5%91%8a%e9%80%89%e9%a1%b9%e4%be%8b%e8%a7%a3/#comment-61</guid>
		<description>发现一个拼写错误，[-Wconvertion] 应为 [-Wconversion]</description>
		<content:encoded><![CDATA[<p>发现一个拼写错误，[-Wconvertion] 应为 [-Wconversion]</p>
]]></content:encoded>
	</item>
	<item>
		<title>作者：panda</title>
		<link>https://tonybai.com/2006/03/14/explain-gcc-warning-options-by-examples/#comment-62</link>
		<dc:creator>panda</dc:creator>
		<pubDate>Tue, 08 Sep 2009 12:21:57 +0000</pubDate>
		<guid isPermaLink="false">http://tonybai.com/2006/03/14/gcc%e8%ad%a6%e5%91%8a%e9%80%89%e9%a1%b9%e4%be%8b%e8%a7%a3/#comment-62</guid>
		<description>非常感谢！</description>
		<content:encoded><![CDATA[<p>非常感谢！</p>
]]></content:encoded>
	</item>
</channel>
</rss>
