From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org,
"Markus T. Metzger" <markus.t.metzger@intel.com>
Subject: Re: [PATCH] linux-record: Squash cases with identical handling
Date: Wed, 13 Apr 2016 15:05:00 -0000 [thread overview]
Message-ID: <m3shypczxm.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <86ega9k97g.fsf@gmail.com> (Yao Qi's message of "Wed, 13 Apr 2016 13:02:43 +0100")
On Wed, Apr 13 2016, Yao Qi wrote:
> I thought about squashing them too, but the reason I didn't do that is
> these enum gdb_syscall in the switch block are listed in the numeric
> order, so that it is quite easy to find whether a syscall is supported,
> or add a new syscall.
Ah, interesting point. If we want to stick to this rule, maybe this
should be stated in a comment above the switch statement?
Or should we aim at getting GDB '-Wswitch'-clean? (Probably a good idea
anyhow...) Then we could replace the default label by explicit case
labels for all unsupported syscalls and rely on GCC to catch any further
missing case labels. Once that's done, the order of case labels
wouldn't matter, IMO.
> but, I don't like the fall-through.
Yeah, it's kind of ugly. I can certainly drop this change from the
patch if that helps.
--
Andreas
next prev parent reply other threads:[~2016-04-13 15:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-13 10:55 Andreas Arnez
2016-04-13 12:03 ` Yao Qi
2016-04-13 15:05 ` Andreas Arnez [this message]
2016-04-14 10:11 ` Yao Qi
2016-04-19 15:10 ` Andreas Arnez
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=m3shypczxm.fsf@oc1027705133.ibm.com \
--to=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=markus.t.metzger@intel.com \
--cc=qiyaoltc@gmail.com \
/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