[lld] r247330 - Fix a warning when building with gcc.

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 17:58:22 PDT 2015


On Thu, Sep 10, 2015 at 4:46 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> Good question. It is the first time I hit it, so I really don't have an
> opinion.
>
> It looks like this one is -Wno-enum-compare. If we are disabling it we
> should probably do it for all of llvm.
>

Yeah, that's what I was implying - I'm not too fussed, but like to raise
the question whenever we suppress a warning that doesn't look like a bug.


>
> Cheers,
> Rafael
>
>
> On 10 September 2015 at 19:24, David Blaikie <dblaikie at gmail.com> wrote:
> >
> >
> > On Thu, Sep 10, 2015 at 1:02 PM, Rafael Espindola via llvm-commits
> > <llvm-commits at lists.llvm.org> wrote:
> >>
> >> Author: rafael
> >> Date: Thu Sep 10 15:02:22 2015
> >> New Revision: 247330
> >>
> >> URL: http://llvm.org/viewvc/llvm-project?rev=247330&view=rev
> >> Log:
> >> Fix a warning when building with gcc.
> >>
> >> It was
> >>
> >> /Writer.cpp:119:45: warning: enumeral and non-enumeral type in
> conditional
> >> expression
> >
> >
> > Any evidence that this catches bugs? Or should we just disable it?
> >
> >>
> >>
> >> Modified:
> >>     lld/trunk/ELF/Writer.cpp
> >>
> >> Modified: lld/trunk/ELF/Writer.cpp
> >> URL:
> >>
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=247330&r1=247329&r2=247330&view=diff
> >>
> >>
> ==============================================================================
> >> --- lld/trunk/ELF/Writer.cpp (original)
> >> +++ lld/trunk/ELF/Writer.cpp Thu Sep 10 15:02:22 2015
> >> @@ -116,7 +116,7 @@ public:
> >>    typedef typename OutputSectionBase<Is64Bits>::uintX_t uintX_t;
> >>    StringTableSection(bool Dynamic)
> >>        : OutputSectionBase<Is64Bits>(Dynamic ? ".dynstr" : ".strtab",
> >> SHT_STRTAB,
> >> -                                    Dynamic ? SHF_ALLOC : 0) {
> >> +                                    Dynamic ? (uintX_t)SHF_ALLOC : 0) {
> >>      this->Header.sh_addralign = 1;
> >>    }
> >>
> >>
> >>
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at lists.llvm.org
> >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150910/0a2dd8c2/attachment.html>


More information about the llvm-commits mailing list