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

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 16:46:31 PDT 2015


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.

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
>
>


More information about the llvm-commits mailing list