From: Simon Marchi <simon.marchi@polymtl.ca>
To: John Baldwin <john@baldwin.cx>
Cc: Yao Qi <qiyaoltc@gmail.com>,
Simon Marchi <simon.marchi@ericsson.com>,
GDB Patches <gdb-patches@sourceware.org>
Subject: Re: Opinion about -Wtautological-compare
Date: Mon, 30 Oct 2017 14:27:00 -0000 [thread overview]
Message-ID: <7c7f750a3ec44f36995099453159f6b7@polymtl.ca> (raw)
In-Reply-To: <189cefb7-aa0c-16bd-d78c-cc6f1e5c1344@baldwin.cx>
On 2017-10-30 08:49, John Baldwin wrote:
> On 10/30/17 9:35 AM, Yao Qi wrote:
>> On Sat, Oct 28, 2017 at 4:24 AM, Simon Marchi
>> <simon.marchi@ericsson.com> wrote:
>>
>>> Personally, I think the warning is useful and can reveal bugs, so I'd
>>> like to keep
>>> it. I lean towards 2 or 3, because they help convey the idea that we
>>> check if the
>>> value is within a range. If you are following with the architecture
>>> manual on the
>>> side, it will probably show the same range (0-3) for those bits, so
>>> it helps if the
>>> code does the same.
>>>
>>
>> My vote is 3. PR 22188.
>
> I vote for 3 as well. I think it is useful to describe both bounds of
> a value
> explicitly even if one bound is at the "edge".
Thanks to you both, I'll post a patch shortly.
Simon
next prev parent reply other threads:[~2017-10-30 14:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-28 3:24 Simon Marchi
2017-10-30 9:35 ` Yao Qi
2017-10-30 12:49 ` John Baldwin
2017-10-30 14:27 ` Simon Marchi [this message]
2017-10-30 14:33 ` [PATCH] Introduce in_inclusive_range, fix -Wtautological-compare warnings Simon Marchi
2017-10-30 15:57 ` John Baldwin
2017-10-30 16:01 ` Simon Marchi
2017-10-30 16:05 ` John Baldwin
2017-10-30 18:29 ` Simon Marchi
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=7c7f750a3ec44f36995099453159f6b7@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=john@baldwin.cx \
--cc=qiyaoltc@gmail.com \
--cc=simon.marchi@ericsson.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