3 ms·
> Letting the compiler assume that a "switch" without a default will never go there is a great optimization too. Why not put that in the standard? that's actua
by gpderetta 6y ago
> Letting the compiler assume that a "switch" without a default will never go there is a great optimization too. Why not put that in the standard?
that's actually the case already. A missing default is UB if the switch condition does not match any of the cases. And C compilers already optimize accordingly.