[lldb-dev] Interest in enabling -Werror by default

Benjamin Kramer via lldb-dev lldb-dev at lists.llvm.org
Tue Feb 16 04:45:07 PST 2016


On Tue, Feb 16, 2016 at 12:24 PM, Tamas Berghammer via lldb-dev
<lldb-dev at lists.llvm.org> wrote:
> I would be happy if we can keep lldb warning free but I don't think enabling
> -Werror is a good idea for 2 reasons:
> * We are using a lot of different compiler and keeping the codebase warning
> free on all of them might not be feasible especially for the less used,
> older gcc versions.
> * Neither llvm nor clang have -Werror enabled so if we enable it then a
> clang/llvm change can break our build with a warning when it is hard to
> justify a revert and a fix might not be trivial.
>
> In short term I would prefer to just create a policy saying everybody should
> write warning free code for lldb (I think it already kind of exists) and we
> as a community try to ensure it during code review and with fixing the
> possible things what slip through. In the longer term I would be happy to
> see -Werror turned on for llvm and clang first and then we can follow up
> with lldb but making this change will require a lot of discussion and might
> get some push back.

Enabling -Werror for LLVM and Clang by default for everyone is
generally not an option. LLVM gets built by many users with new
compilers, old compilers and broken compilers that we have never heard
about. Breaking their build just because the compiler decided to emit
a warning provides no value, only pain. I'm happy with forcing -Werror
on developers, but I don't know how to express that in the build
system.

> On Tue, Feb 16, 2016 at 6:02 AM Saleem Abdulrasool via lldb-dev
> <lldb-dev at lists.llvm.org> wrote:
>>
>> Hi,
>>
>> It seems that enabling -Werror by default is within reach for lldb now.
>> There currently are three warnings that remain with gcc 5.1 on Linux, and
>> the build is clean of warnings with clang.
>>
>> There are two instances of type range limitations on comparisons in
>> asserts, and one instance of string formatting which has a GNU
>> incompatibility.
>>
>> Is there any interest in enabling -Werror by default to help keep the
>> build clean going forward?
>>
>> --
>> Saleem Abdulrasool
>> compnerd (at) compnerd (dot) org
>> _______________________________________________
>> lldb-dev mailing list
>> lldb-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>


More information about the lldb-dev mailing list