[cfe-commits] r150055 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td test/Sema/switch.c

Ted Kremenek kremenek at apple.com
Wed Feb 8 20:48:17 PST 2012


On Feb 8, 2012, at 5:25 PM, Chandler Carruth <chandlerc at google.com> wrote:

> I think we should have two categories here, with better names:
> 
> -Wimportant -- These are warnings we expect to be valuable even for large existing codebases. We recommend essentially everyone that can use these.
> 
> -Wuseful -- These are warnings which have high utility, but may require non-trivial code changes to accomodate.
> 
> There are probably still better names, these are what I came up with off the cuff.
> 
> Currently we use "-Wall" to mean the first of these. I wonder if we could use -Wextra to mean the second. I also wonder whether we should add aliases with more clear names.
> 

I like this idea, but the key is the message one delivers to users.  The caveat with -Wuseful (or whatever it is called) is that it can change from release to release, and people who use it should not expect that the set of warnings will stay fixed, or that their behavior can't change.

What I've seen is cases where people treat -Wall as having immutable behavior, and then pair -Wall with -Werror.  This is a nightmare when rolling out a new compiler with additional warnings that pop up under -Wall.  Unfortunately, IIRC (and I could be mistaken), -Wmost came into being because there were some warnings in -Wall that some users didn't want, and those users probably have the same expectations of -Wmost that other users have of -Wall.  With these expectations, we're somewhat limited with how much we can change -Wall and -Wmost.

As long as don't repeat history with proposed new warning groups, I'm fine with considering them, but the message needs to be really clear.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120208/e89c677b/attachment.html>


More information about the cfe-commits mailing list