<div class="gmail_quote">On Sat, Jan 21, 2012 at 11:43 AM, Fariborz Jahanian <span dir="ltr"><<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":6mx">Yes, clang currently treats -Wswitch-enum same as -Wswitch. Maybe, while you<br>
are at it you can address this too. Once -Wswitch-enum is corrected, a "default' can no<br>
longer hide missing case labels.</div></blockquote></div><br><div>I worry that fixing -Wswitch-enum will simply cause everyone to turn it off, and only turn on -Wswitch. I certainly wouldn't be interested in the behavior described by -Wswitch-enum. It's important to be able to write a compact switch that wants to handle exactly two cases from an enumeration, and default the rest. The nice thing about David's patch is that when the default becomes unnecessary, we notice it, remove it, and start benefitting from -Wswitch warnings. So i think David's warning is likely to be valuable even with a fixed -Wswitch-enum, and fixing -Wswitch-enum will just make -Wswitch-enum essentially unused. =/</div>