<div class="gmail_extra"><div class="gmail_quote">Thanks for the awesome update. A few tiny comments inline.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On Wed, Apr 25, 2012 at 2:08 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">Hi,<br><br><div class="gmail_quote"><div class="im">On Wed, Apr 25, 2012 at 6:12 PM, Alexander Kornienko <span dir="ltr"><<a href="mailto:alexfh@google.com" target="_blank">alexfh@google.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>The new version of patch addresses most of the issues discussed here + refactored code ;)</div></blockquote><div>
<br>
</div></div><div>More specifically, changes in this version of patch:</div><div> * diagnostic message reworded; each warning is accompanied by exactly one note with a fix-it hint, for simplicity and consistency the location to insert fall-through annotation is always immediately before the relevant case label:</div>

<div><div><font face="courier new, monospace">test.cpp:16:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]</font></div><div><font face="courier new, monospace">    case 13:</font></div>
<div>
<font face="courier new, monospace">    ^</font></div><div><font face="courier new, monospace">test.cpp:16:5: note: insert [[fallthrough]]; to silence this warning [-Wimplicit-fallthrough]</font></div></div></div></div></blockquote>
<div><br></div><div>s/to silence this warning/to annotate the fall-through as intentional/ ?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra">
<div class="gmail_quote"><div><div><font face="courier new, monospace">    case 13:</font></div>
<div><font face="courier new, monospace">    ^</font></div><div><font face="courier new, monospace">    [[fallthrough]];</font></div></div><div> * added specific diagnostic message for unreachable fall-through annotation, e.g. this code:</div>

</div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_quote"><div><font face="courier new, monospace">switch(x) {</font></div></div></div><div class="gmail_extra">

<div class="gmail_quote"><div><font face="courier new, monospace">case 1:</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="courier new, monospace">  break;</font></div></div></div>

<div class="gmail_extra"><div class="gmail_quote"><div><font face="courier new, monospace">  [[fallthrough]];</font></div></div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="courier new, monospace">case 2:</font></div>

</div></div><div class="gmail_extra"><div class="gmail_quote"><div><font face="courier new, monospace">...</font></div></div></div></blockquote><div class="gmail_extra"><div class="gmail_quote"><div>will produce a similar warning:</div>

<div><div><font face="courier new, monospace">test.cpp:12:7: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]</font></div><div><font face="courier new, monospace">      [[fallthrough]];</font></div>

<div><font face="courier new, monospace">      ^</font></div></div></div></div></blockquote><div><br></div><div>Idea for a future iteration: add a note that points to the break here, at least in the easy cases. We should be able to find the terminator of the CFG block which precedes this somehow.</div>
<div><br></div><div><br></div><div>More comments on your other email.</div></div></div>