public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dcb314 at hotmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64524] gcc can't detect same expression in both parts of ternary operator
Date: Wed, 07 Jan 2015 20:38:00 -0000 [thread overview]
Message-ID: <bug-64524-4-Qx6zivfbB0@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64524-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64524
--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Andrew Pinski from comment #5)
> And really here is another false positive:
> #define a 1
> #define b 1
>
> int t = c > d ? a : b;
Assuming you meant
int t = (c > d) ? a : b;
then I'd be interested to find out how that's a false positive.
Just to add some salt into the pot, another interesting case might be
enum E { a, b, c, d };
void f(int val)
{
int n = (val >= 10) ? a : (d - 4);
next prev parent reply other threads:[~2015-01-07 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-07 16:54 [Bug c++/64524] New: " dcb314 at hotmail dot com
2015-01-07 17:49 ` [Bug c++/64524] " jakub at gcc dot gnu.org
2015-01-07 18:00 ` dcb314 at hotmail dot com
2015-01-07 18:12 ` jakub at gcc dot gnu.org
2015-01-07 19:45 ` maltsevm at gmail dot com
2015-01-07 20:12 ` pinskia at gcc dot gnu.org
2015-01-07 20:38 ` dcb314 at hotmail dot com [this message]
2015-01-07 20:39 ` dcb314 at hotmail dot com
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=bug-64524-4-Qx6zivfbB0@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).