<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 30, 2014, at 19:47 , Kyle Sluder <<a href="mailto:kyle@ksluder.com">kyle@ksluder.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Mar 28, 2014, at 1:52 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com">jordan_rose@apple.com</a>> wrote:<br><blockquote type="cite"><br>Hi, Daniel. We already have this in Clang itself as -Wimplicit-fallthrough,<br></blockquote><br>That warning triggers for every fallthrough. Daniel’s checker only triggers for assignments that are redundant with assignments made in cases that are fallen into.<br><br>These are philosophically different approaches, and they are mutually compatible. Even if -Wimplicit-fallthrough becomes useful to C/ObjC programmers via the __fallthrough macro, Daniel’s checker is still useful because it will catch logic bugs in code that redundantly assigns to the same variable in two different cases.<br></blockquote></div><br><div>Ah, interesting. Isn't this already caught with the dead stores checker, though?</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(148, 58, 32); background-color: rgb(223, 219, 196);"><b><stdin>:5:5: </b><span style="color: #c02ec0"><b>warning: </b></span><b>Value stored to 'y' is never read</b></div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(76, 47, 45); background-color: rgb(223, 219, 196);">    y = 1;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; color: rgb(0, 165, 0); background-color: rgb(223, 219, 196);"><b>    ^   ~</b></div></div><div><b><br></b></div><div>We could probably stand to improve that checker to say <i>why</i> something's a dead store, but I don't think we need a separate pass.</div><div><br></div><div>Jordan</div></body></html>