On Wed, Jan 19, 2022 at 12:27:32PM +0100, Jakub Jelinek wrote: > On Wed, Jan 19, 2022 at 07:54:19AM +0100, Sebastian Huber wrote: > > On 18/01/2022 22:42, Segher Boessenkool wrote: > > > > + default: > > > > + break; > > > Please don't do that. You can do > > > > > > default: > > > break; > > > break; > > > /* And just to make sure: */ > > > break; > > > break; > > > > > > and it will do exactly the same as not having a default at all. Not > > > having such useless code is by far the most readable, so please don't > > > include a default case at all. > > > > I removed the default case. I hope this is what you wanted.
It was. > Unfortunately the removal of default: break; breaks bootstrap: &^$()^&#%(^&^! A questionable warning (switch often is used as a "shorthand" for a bunch of if statements, like here; quotes because it is actually *longer* in this case). And combined with -Werror (the scourge of sanity) it is much worse: we often make worse code just not to have the mistaken warnings. > I've committed following as obvious to unbreak the bootstrap. Thanks! Segher