<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:chengniansun@gmail.com" title="Chengnian Sun <chengniansun@gmail.com>"> <span class="fn">Chengnian Sun</span></a>
</span> changed
<a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - No -Wempty-body warning for empty body with a prefix label"
href="http://llvm.org/bugs/show_bug.cgi?id=18877">bug 18877</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>RESOLVED
</td>
<td>REOPENED
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>INVALID
</td>
<td>---
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - No -Wempty-body warning for empty body with a prefix label"
href="http://llvm.org/bugs/show_bug.cgi?id=18877#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED --- - No -Wempty-body warning for empty body with a prefix label"
href="http://llvm.org/bugs/show_bug.cgi?id=18877">bug 18877</a>
from <span class="vcard"><a class="email" href="mailto:chengniansun@gmail.com" title="Chengnian Sun <chengniansun@gmail.com>"> <span class="fn">Chengnian Sun</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=18877#c1">comment #1</a>)
<span class="quote">> Right. This warning is to detect the 'stray semicolon' bug:
>
> if (foo);
> blah;
>
> The labelled semicolon case doesn't match this pattern.</span >
Hi Richard,
Thanks. I understand why it is not warned, but I do not understand why the
given test case with an empty body does not fit into -Wempty-body.
The pattern makes sense, but is it a little conservative? For the if statement
"if (i) a:;", the programmer cannot easily find out that it is an empty
statement due to the labelled semicolon, which is equally bad to the stray
semicolon.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>