From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4532686938023404680==" MIME-Version: 1.0 From: Mark Wielaard 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 Message-ID: <1460387638.7712.27.camel@redhat.com> In-Reply-To: 1460383257-13019-1-git-send-email-david.abdurachmanov@cern.ch --===============4532686938023404680== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Mon, 2016-04-11 at 16:00 +0200, david.abdurachmanov(a)cern.ch wrote: > From: David Abdurachmanov > = > Noticed with Fedora 24 Alpha, gcc (GCC) 6.0.0 20160406 > (Red Hat 6.0.0-0.20). > = > elfcmp.c: In function =E2=80=98main=E2=80=99: > elfcmp.c:364:199: error: self-comparison always evaluates > to false [-Werror=3Dtautological-compare] > if (unlikely (name1 =3D=3D NULL || name2 =3D=3D NULL > @@ -368,7 +368,7 @@ main (int argc, char *argv[]) > && sym1->st_shndx !=3D SHN_UNDEF) > || sym1->st_info !=3D sym2->st_info > || sym1->st_other !=3D sym2->st_other > - || sym1->st_shndx !=3D sym1->st_shndx)) > + || sym1->st_shndx !=3D 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 --===============4532686938023404680==--