From: Segher Boessenkool <segher@kernel.crashing.org>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Sebastian Huber <sebastian.huber@embedded-brains.de>,
gcc-patches@gcc.gnu.org
Subject: Re: [committed] rs6000: Fix bootstrap
Date: Wed, 19 Jan 2022 09:51:04 -0600 [thread overview]
Message-ID: <20220119155104.GE614@gate.crashing.org> (raw)
In-Reply-To: <20220119112732.GS2646553@tucnak>
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
next prev parent reply other threads:[~2022-01-19 15:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 11:51 [PATCH] powerc: Fix asm machine directive for some CPUs Sebastian Huber
2022-01-18 21:42 ` Segher Boessenkool
2022-01-19 6:54 ` Sebastian Huber
2022-01-19 11:27 ` [committed] rs6000: Fix bootstrap Jakub Jelinek
2022-01-19 15:51 ` Segher Boessenkool [this message]
2022-02-02 17:07 ` [PATCH] powerc: Fix asm machine directive for some CPUs Sebastian Huber
2022-02-02 18:01 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220119155104.GE614@gate.crashing.org \
--to=segher@kernel.crashing.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=sebastian.huber@embedded-brains.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).