[cfe-commits] [Patch] Extend -Wliteral-conversion to warn on string literals to bool conversion
Richard Trieu
rtrieu at google.com
Tue Sep 13 17:54:47 PDT 2011
On Fri, Sep 9, 2011 at 4:13 PM, Richard Trieu <rtrieu at google.com> wrote:
> Add a new warning and bundle it into -Wliteral-conversion. This
> warning triggers on cases where a string literal is implicitly
> converted to a bool. For the common case of:
>
> assert(condition && "Error text");
>
> an exception for string literals in logical operations has also been included.
>
Currently, the patch has this new warning bundled in with
-Wliteral-conversion. It's been brought up that -Wbool-conversions
might be a more suitable place for this warning. Any thoughts on
this?
More information about the cfe-commits
mailing list