On Mon, Sep 26, 2011 at 4:39 PM, John McCall <[email protected]> wrote:

> > The string literal to boolean conversion is a new warning.  There was
> > some discussion of where to put it, from literal-conversion or
> > bool-conversion.  I was moving it to its own flag so we can have the
> > warning while we figure out which of these places would be best for
> > it.
>
> Okay, as long as it doesn't stay there.  And for next time, it's fine to
> just let it sit in one or the other until the discussion is done, I think.


This was largely my request to Richard. Essentially, -Wliteral-conversion
fires a great deal, with a high false-positive rate. We're considering
turning it on anyways, but I can imagine a lot of code may never be
interested in turning that set of warnings on.

However, -Wbool-conversion and this new warning Richard added were based on
specific bug reports. We've found hundreds of bugs with these two warnings,
and very few false-positives. I originally suggested just putting both of
these under 'bool-conversion' even though one is converting from a bool to a
pointer, and the other from a pointer to a bool. I would be happy with
consolidating them into any flag name that seems appropriate and
sufficiently descriptive. My only real goal is to keep the extremely
high-value warnings available even when -Wliteral-conversion (much less the
even more noisy variants) aren't feasible for a codebase.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to