[PATCH] D41512: [Sema] -Wtautological-constant-compare is too good. Cripple it.

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 24 08:56:46 PST 2017


On Sun, Dec 24, 2017 at 11:45 AM, Dimitry Andric via Phabricator
<reviews at reviews.llvm.org> wrote:
> dim added a comment.
>
> Actually, having thought about it a little more, if the warning is "rather broken", or even "completely broken", depending on one's point of view, then maybe it is better not have it under `-Wextra` either?  E.g. somebody has to ask for the warning specifically, using `-Wtautological-constant-compare`, or use `-Weverything`?
>
> I ask this, because in FreeBSD we have traditionally been using `-W`, which is (again, historically) an alias for `-Wextra`.  We now still have to explicitly use `-Wno-tautological-constant-compare` everywhere. :-(

I think having it under -Wextra is reasonable -- I don't think it's
rather/completely broken, I think it's more strict at diagnosing
issues than some people would like to see by default (which can be a
subjective measure).

If we're talking about removing it from -Wextra such that you have to
enable it by name only, I'd say it should be removed entirely (at
least temporarily) -- "no one" enables diagnostics by name (and very
few use -Weverything) and it increases our maintenance burden to carry
around a feature no one will use.

~Aaron


More information about the cfe-commits mailing list