From: Bernd Edlinger <bernd.edlinger@hotmail.de>
To: Marek Polacek <polacek@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: C/C++ PATCH for c/77423 (bogus warning with -Wlogical-not-parentheses)
Date: Fri, 02 Sep 2016 15:51:00 -0000 [thread overview]
Message-ID: <HE1PR0701MB2169E06960F0F1577E956BC4E4E50@HE1PR0701MB2169.eurprd07.prod.outlook.com> (raw)
Hi,
> + r += !a == ~b;
> + r += !a == ~(int) b;
I don't understand why ~b should not be warned at -Wall.
Frankly I don't even understand why the above statements are
completely optimized away.
r += !a == ~b;
is optimized away, but
b = ~b;
r += !a == b;
Is not. Why?
Bernd.
next reply other threads:[~2016-09-02 15:51 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 15:51 Bernd Edlinger [this message]
2016-09-05 14:08 ` Marek Polacek
2016-09-05 14:28 ` Bernd Edlinger
2016-09-05 14:39 ` Marek Polacek
2016-09-05 15:03 ` Bernd Edlinger
2016-09-05 16:46 ` Joseph Myers
2016-09-05 17:03 ` Bernd Edlinger
2016-09-15 19:55 ` Jeff Law
2016-09-16 9:05 ` Marek Polacek
2016-09-05 15:01 ` Eric Gallager
2016-09-05 15:08 ` Bernd Edlinger
-- strict thread matches above, loose matches on Subject: below --
2016-09-02 15:14 Marek Polacek
2016-09-05 10:51 ` Bernd Schmidt
2016-09-05 10:57 ` Marek Polacek
2016-09-05 16:12 ` Bernd Schmidt
2016-09-05 16:44 ` Sandra Loosemore
2016-09-06 9:08 ` Marek Polacek
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=HE1PR0701MB2169E06960F0F1577E956BC4E4E50@HE1PR0701MB2169.eurprd07.prod.outlook.com \
--to=bernd.edlinger@hotmail.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=polacek@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).