<div class="gmail_quote">On Wed, Jan 11, 2012 at 2:25 AM, Duncan Sands <span dir="ltr"><<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Chandler,<br>
<div class="im"><br>
> Add 'llvm_unreachable' to passify GCC's understanding of the constraints<br>
> of several newly un-defaulted switches. This also helps optimizers<br>
> (including LLVM's) recognize that every case is covered, and we should<br>
> assume as much.<br>
<br>
</div>previously if you added a new value to one of these enums then you would get a<br>
compiler warning from clang, while now you now longer get a compiler warning<br>
(right?).</blockquote><div><br></div><div>Nope, I've not changed the switch. David Blaikie changed all of these switches to no longer have the default case, thereby giving us the compiler warning.</div><div><br></div>
<div>I've added the unreachable bit after the switch entirely, preserving the switch compiler warning, but silencing the compiler warnings about falling off the end of the *function*.</div><div><br></div><div>Richard had a patch that added a default case back, but I think he fixed it already....</div>
</div>