[cfe-dev] proposal: every warning should have a -W flag

Aaron Ballman aaron at aaronballman.com
Tue Aug 9 15:25:25 PDT 2011


> I don't find it useful to number individual diagnostics, because it makes it harder to split a single diagnostic into several diagnostics further down the road. If someone has suppressed D1234, and we split that diagnostic into several, more-specific diagnostics, does suppressing D1234 still suppress those? Should it?
>
> I'd much prefer that we have a logical grouping for our warnings, so we can document warning sets together.

We can have our cake and eat it too, perhaps.  Group the warnings
logically, but allocate blocks of warning numbers with padding for
future expansion.  For instance, numeric warnings are all in the D1000
- D1100 range.  Then we can still split warnings into more specific
diagnostics, allocate them new numbers, but are able to keep the
grouping cohesive.

This, of course, is predicated on the thought that having individual
warning numbers is useful to the majority of people.  From personal
experience, I like having a warning number because it makes it easier
to Google for others who've had the same issue.  Most diagnostics
contain source-specific information, and so Google searches become a
guessing game of what keywords are important.  YMMV

~Aaron




More information about the cfe-dev mailing list