This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Named warnings


Joe Buck wrote:

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.

Wouldn't you really need to do something like this anyway?

There are several front ends that are not yet integrated into the
main gcc structure (like pascal and cobal), and it would probably
be much easier to manage the errors for a new/unmerged front end
than trying to stuff in hundreds of new error codees into
a single "enum" when a new front end is developed.

I think a single error message space would become unweildly
quite fast. People will try to conserve the "error number" space,
but the errors generated for a front end like 'C' are
going to mean something different than other front ends,
like fortran, even though the error text might be the same.

If someone wanted to write detailed documentation for the
common causes/fixes of each error message, it will necessarly
be  dependent on which front end is used.

That way, the different teams can maintain their own sequences and the
documentation will wind up more organized.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]