From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: Re: [PATCH] elfcmp: fix self-comparison error with GCC 6
Date: Mon, 11 Apr 2016 17:13:58 +0200 [thread overview]
Message-ID: <1460387638.7712.27.camel@redhat.com> (raw)
In-Reply-To: 1460383257-13019-1-git-send-email-david.abdurachmanov@cern.ch
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
On Mon, 2016-04-11 at 16:00 +0200, david.abdurachmanov(a)cern.ch wrote:
> From: David Abdurachmanov <davidlt@cern.ch>
>
> Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406
> (Red Hat 6.0.0-0.20).
>
> elfcmp.c: In function ‘main’:
> elfcmp.c:364:199: error: self-comparison always evaluates
> to false [-Werror=tautological-compare]
> if (unlikely (name1 == NULL || name2 == NULL
> @@ -368,7 +368,7 @@ main (int argc, char *argv[])
> && sym1->st_shndx != SHN_UNDEF)
> || sym1->st_info != sym2->st_info
> || sym1->st_other != sym2->st_other
> - || sym1->st_shndx != sym1->st_shndx))
> + || sym1->st_shndx != sym2->st_shndx))
> {
> // XXX Do we want to allow reordered symbol tables?
> symtab_mismatch:
Thanks! And oops. Applied since that was obviously wrong.
Nice that GCC caught that. I am slightly surprised my own GCC6 testing
didn't find this. I am using upstream gcc (GCC) 6.0.0 20160410
(experimental). Did you have to do anything special on your Fedora setup
to make GCC detect this?
Thanks,
Mark
next reply other threads:[~2016-04-11 15:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-11 15:13 Mark Wielaard [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-04-11 17:25 David Abdurachmanov
2016-04-11 14:00 david.abdurachmanov
2016-04-11 13:50 david.abdurachmanov
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=1460387638.7712.27.camel@redhat.com \
--to=mjw@redhat.com \
--cc=elfutils-devel@lists.fedorahosted.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).