[cfe-dev] How to suppress a specific diagnostic?

Arthur O'Dwyer arthur at push.am
Thu Apr 26 21:57:50 PDT 2012

On Thu, Apr 26, 2012 at 6:00 PM, Jordy Rose <jediknil at belkadan.com> wrote:
> If the warning you're interested in does /not/ have an individual flag
> (and most warnings mention which flag they're associated with in their
> diagnostic message),

You guessed it. The warnings that do mention flags aren't *so* much of
a problem, although it's still annoying that I can't turn off just one
specific warning --- e.g. if the spammy warning is about unused
parameters, I have to pass e.g. -Wno-unused to turn off *all* warnings
that relate to unused things, not just parameters.

> you could even file a bug, since we're working towards
> getting every warning under a flag.

Surely the Right Answer really is to copy EDG's way of doing it, and
assign each diagnostic a unique identifier (which is to say, a unique
integer) --- which will also help with internationalization, if anyone
ever wants to translate all the error messages to a different language
and needs to unambiguously refer to a message for that reason.


More information about the cfe-dev mailing list