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: Tue, 19 Apr 2016 15:10:00 -0000 [thread overview]
Message-ID: <m360vdws7k.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <868u0gmrf2.fsf@gmail.com> (Yao Qi's message of "Thu, 14 Apr 2016 11:10:57 +0100")
On Thu, Apr 14 2016, Yao Qi wrote:
> Andreas Arnez <arnez@linux.vnet.ibm.com> writes:
>
>> 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?
>>
>
> It is not my intention to stick to this rule.
>
>> Or should we aim at getting GDB '-Wswitch'-clean? (Probably a good idea
>
> -Wswitch is enabled by -Wall, so gdb is '-Wswitch'-clean already.
Well, GDB currently uses -Wno-switch. And if I build GDB without that
option, I get lots of warnings for -Wswitch.
>
>> 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.
>>
>
> That will be overkill compared with your patch, so ...
>
>>> 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.
>>
>
> ... your patch except the fall-through is good to me.
Thanks, pushed without that.
--
Andreas
prev parent reply other threads:[~2016-04-19 15:10 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
2016-04-14 10:11 ` Yao Qi
2016-04-19 15:10 ` Andreas Arnez [this message]
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=m360vdws7k.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