[cfe-dev] numbered warnings & errors?

Daniel Dunbar daniel at zuster.org
Tue Jan 5 11:33:27 PST 2010

On Tue, Jan 5, 2010 at 10:52 AM, Chris Lattner <clattner at apple.com> wrote:
> On Jan 5, 2010, at 10:51 AM, Daniel Dunbar wrote:
>>> How is this different and better than the existing warning group stuff?
>>>  They are already hierarchical and unique.  The only difference is that
>>> they
>>> aren't in reverse dotted form?
>> The notable difference is that each warning does not have a unique
>> hierarchical identifier which also functions as its canonical name
>> (i.e., in documentation). We have an ad-hoc naming convention for
>> diagnostics in the code, but those names aren't exposed.
>> From the perspective of warning groups, most diagnostics have no name,
>> some have multiple names, and the names as visible to the user are
>> totally unrelated to the internal diagnostic names.
> Ah, so you really want a 1-1 mapping between diagnostics and "names".  Ok.

Yes, at least to satisfy the stated goal of having a single "key"
which can be used to search for information on a diagnostic or
reference documentation.

>  How stable are the names though?  Would they be exposed through a command
> line interface (something like -W flags)?

Good questions; this was more of an idea-in-my-head than a concrete
proposal I had ready to bring forward. One question I have is how much
of an interesting hierarchy can be imposed on diagnostics anyway. If I
was going to work on this, my first step would probably just to be to
organize the existing warnings identifiers into a reasonable grouping
and impose naming conventions on the identifiers. If that organization
can be well defined and documented, then perhaps it can be stabilized
into a visible warning ID.

 - Daniel

> -Chris

More information about the cfe-dev mailing list