[PATCH] Let "-w" ignore all warnings

Manuel Klimek klimek at google.com
Tue Mar 19 09:38:41 PDT 2013


On Tue, Mar 19, 2013 at 9:13 AM, Jordan Rose <jordan_rose at apple.com> wrote:

>
>   IMHO this is the wrong thing to do. Warnings that are errors by default
> are errors for a good reason: it is usually //very// hard to find a
> legitimate use case. I see that -Wstatic-float-init is actually something
> reasonable to do, but the warning text just suggests adding `constexpr`; is
> that so hard to do? (Is that incompatible with other C++11 compilers?)
>

Fixing something like this across a 100MLOC code base that has parts that
require C++03 compatibility is unfortunately a non-trivial amount of work.

In addition, it's unexpected that not all warnings are switched off by -w.
We particularly ran into that problem when running tools on our code base
with -w, which led to different behavior than switching off the warning on
its own.


>   Put this way: if -Wstatic-float-init were a hard error with a fixit,
> wouldn't you just accept the fixit and move on, even though Clang can
> perfectly well tell what you want to do?
>

If it was an error, we would just pay the cost of fixing the code base (and
we do so for all warnings that catch enough bugs to be worth it, too).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130319/1988ea69/attachment.html>


More information about the cfe-commits mailing list