This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Named warnings
Joe Buck <jbuck@synopsys.com> writes:
[...]
| 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.
However, during developement, warnings get merged or splitted.
Furthermore, GCC has concrete experience with -Wxxx scheme. It is much
natural to extend that scheme at the #pragma level that use bunch of
new numbers.
If a -Wxxx causes a warning to be issued in a particular file, then
it is far easier and less contrived to edit that file and adds
#pragma warning xxx [on|off]
around the offending code than find out the handbook and lookup the
corresponding number. We have to take ease of use into account.
Since we don't translate #pragma nor the keywords nor the various
switches GCC understands, I find the natural-language issue very weak.
-- Gaby