This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Named warnings
gdr@integrable-solutions.net (Gabriel Dos Reis) wrote on 24.01.03 in <m3d6mm52g3.fsf@uniton.integrable-solutions.net>:
> Mark Mitchell <mark@codesourcery.com> writes:
>
> [...]
>
> | So, in favor of numbers:
>
> [...]
>
> | - They're language-independent.
>
> I disagree. *Some* warnings are language-independent -- thery are
> usually triggered by middle- or back-end. Others are highly
> language-dependent. Trying to make a number means different warnings
> depending on the selected language is very confusing.
I read Mark as meaning human-language independent, not computer-language
independent.
> Named warnins has the advantages to be more self-descriptive than
> numbers. Computers are very good at that. I fear only a very
> limited number of humans are equally good at that.
Well, all the programs I remember using that had named messages with
(relatively) short alphanumeric labels - *all* of them - used only or
mainly numbers (often with a short letter pre- and/or postfix to indicate
product and severity). Of course, there was still the usual text in those
messages, too.
And if there *is* a master message list in the docs, I have trouble
imagining a situation where the lack of self-description in those
identifiers would be any kind of trouble - if I need to use a number,
either it's in a compiler message I'm already staring at, or it's in a
Makefile or source file (and I can look up the message in the docs) ... or
if I'm looking for the number without any of these, I'd need that master
list in any case because however mnemonic, I'll not know all of them by
heart.
Remember, this is the way errno works (except the master list is usually
in an inconvenient place, like something included by errno.h or the source
to strerror). People are *used* to this kind of interface.
Oh, and when you put something like the usual warning option names in the
warnings, those already long lines can get significantly longer. That's
bad UI design.
MfG Kai