<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 3:36 PM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This is a very useful warning, thanks.<div><br></div><div>One issue I have with it is that it's disabled by Wno-tautological-compare. From the warning name that makes sense – but Wtautological-compare used to be a fairly harmless warning, so we (chromium) disabled it for a bunch of third-party libraries. When Wtautological-undefined-compare arrived, we fixed all instances of this in our code and updated our compiler to a clang that optimizes away comparisons of references with NULL (since we had fixed all of these comparisons, we thought!)</div>

<div><br>I recently realized that we didn't see Wtautological-undefined-compare warnings for all the third-party libraries that we're building with Wno-tautological-compare.</div><div><br></div><div>Do you think Wtautological-undefined-compare should be in its own warning group (and maybe have a different name to make that clear), so that folks who disabled Wtautological-compare still get this warning? The reasoning is that this warning is much more serious that what Wtautological-compare used to warn about.</div>
</div></blockquote></div><br>I don't really understand why. There is no actual undefined behavior here, just a comparison that can never, ever be go the other way. It seems almost exactly as severe as comparing an unsigned number for >= 0?</div>
</div>