r210372 - Add -Wtautological-undefined-compare and -Wundefined-bool-conversion warnings

Chandler Carruth chandlerc at google.com
Tue Aug 5 16:24:01 PDT 2014


On Tue, Aug 5, 2014 at 4:22 PM, Reid Kleckner <rnk at google.com> wrote:

> IMO there is a big difference.  All compilers have always returned true
> for unsigned >= 0, but other compilers may return true for &reference ==
> nullptr.
>
> So, we can ignore the unsigned >= 0 warning so long as we are reasonably
> confident in past test coverage.
>
> However, with the &reference == nullptr behavior change, we don't have
> that confidence.  Therefore it is more severe.
>

FWIW, I think this might be a good reason to default the warning to on, but
it still seems like a somewhat tenuous argument for
'-Wno-tautological-compare' to leave this warning enabled...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140805/01fcdd72/attachment.html>


More information about the cfe-commits mailing list