From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Markus Trippelsdorf <markus@trippelsdorf.de>, Jeff Law <law@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>,
Jason Merrill <jason@redhat.com>,
Florian Weimer <fw@deneb.enyo.de>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Make -Wint-in-bool-context warn on suspicious shift ops
Date: Thu, 20 Oct 2016 14:00:00 -0000 [thread overview]
Message-ID: <HE1PR0701MB2169E696429EAEFEECCDBB7DE4D50@HE1PR0701MB2169.eurprd07.prod.outlook.com> (raw)
In-Reply-To: <20161020080535.GA6526@x4>
On 10/20/16 10:05, Markus Trippelsdorf wrote:
>
> Thanks for the commit. But I think the comment is wrong:
>
> + /* We will only warn on unsigned shifts here, because the majority of
> ^^
> This should be »signed«.
>
Oops. Thanks for noticing.
This is what I am going to check in as obvious:
--- ChangeLog (revision 241376)
+++ ChangeLog (working copy)
@@ -1,3 +1,7 @@
+2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * c-common.c (c_common_truthvalue_conversion): Fix the comment.
+
2016-10-20 Jason Merrill <jason@redhat.com>
* c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
Index: c-common.c
===================================================================
--- c-common.c (revision 241376)
+++ c-common.c (working copy)
@@ -3328,7 +3328,7 @@
TREE_OPERAND (expr, 0));
case LSHIFT_EXPR:
- /* We will only warn on unsigned shifts here, because the majority of
+ /* We will only warn on signed shifts here, because the majority of
false positive warnings happen in code where unsigned arithmetic
was used in anticipation of a possible overflow.
Furthermore, if we see an unsigned type here we know that the
result of the shift is not subject to integer promotion rules. */
Bernd
next prev parent reply other threads:[~2016-10-20 14:00 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-25 9:14 Bernd Edlinger
2016-09-27 12:45 ` Jason Merrill
2016-09-27 12:58 ` Florian Weimer
2016-09-27 13:56 ` Bernd Edlinger
2016-09-27 14:34 ` Florian Weimer
2016-09-27 14:42 ` Bernd Edlinger
2016-09-27 14:51 ` Jason Merrill
2016-09-27 15:19 ` Bernd Edlinger
2016-09-28 14:44 ` Jason Merrill
2016-09-28 16:17 ` Bernd Edlinger
2016-09-29 18:10 ` Jason Merrill
2016-09-29 19:07 ` Bernd Edlinger
2016-09-29 20:08 ` Bernd Edlinger
2016-09-29 20:53 ` Jason Merrill
2016-09-30 7:05 ` Bernd Edlinger
2016-10-02 18:38 ` Jason Merrill
2016-10-08 17:40 ` Jason Merrill
2016-10-08 20:05 ` Bernd Edlinger
2016-10-09 2:42 ` Jason Merrill
2016-10-17 15:23 ` Markus Trippelsdorf
2016-10-17 16:51 ` Bernd Edlinger
2016-10-17 17:11 ` Markus Trippelsdorf
2016-10-17 17:30 ` Bernd Edlinger
2016-10-17 17:44 ` Markus Trippelsdorf
2016-10-18 17:04 ` Bernd Edlinger
2016-10-18 17:05 ` Joseph Myers
2016-10-18 18:14 ` Bernd Edlinger
2016-10-19 20:13 ` Jeff Law
2016-10-20 8:05 ` Markus Trippelsdorf
2016-10-20 14:00 ` Bernd Edlinger [this message]
2016-09-27 13:48 ` Michael Matz
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=HE1PR0701MB2169E696429EAEFEECCDBB7DE4D50@HE1PR0701MB2169.eurprd07.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=fw@deneb.enyo.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=law@redhat.com \
--cc=markus@trippelsdorf.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).