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

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 16:24:24 PDT 2015


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/8ae16fc8/attachment.html>


More information about the llvm-commits mailing list