This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Named warnings
On Fri, Jan 24, 2003 at 12:15:22AM -0800, Mark Mitchell wrote:
> Since steps 3/4 come together, something like:
>
> warning [123]: You're a moron, Mark.
>
> is easily dealt with; you copy the "123" into your code.
>
> I'm not sure that:
>
> warning [moron-mark]: You're a moron, Mark.
>
> is going to be very friendly if that foo-bar-baz string gets long,
> and if it's not present then it's a pain in the neck to find the
> supposedly mnemonic string.
I think that the strongest argument is the language issue:
Warnung [123]: Du bist Dummkopf, Mark.
versus
Warnung [moron-mark]: Du bist Dummkopf, Mark.
versus
Warnung [dummkopf-mark]: Du bist Dummkopf, Mark.
And if a warning goes away, we just reserve the number, and document
it as obsolete.
There is, though, an issue coming from the fact that we support multiple
languages: if warnings are added over time, a linear sequence would mean
that the C, C++, Java, etc. warnings all get mixed up. One possibility
is to use some kind of prefix to indicate the component (language front
end, "middle end", backend) where the warning comes from, so we have
warning [C++-123]: You're a fool, Joe.
That way, the different teams can maintain their own sequences and the
documentation will wind up more organized.