A better (more portable) way of printing variable argument lists
Kamil Iskra
kiskra@ernie.icslab.agh.edu.pl
Fri Feb 27 03:04:00 GMT 1998
[I must have missed the original letter of Jeffrey Law as I only so
Kaveh's reply, so perhaps what I have in mind has already been discussed -
sorry if that's the case ]
On Thu, 26 Feb 1998, Kaveh R. Ghazi wrote:
> > From: Jeffrey A Law <law@hurl.cygnus.com>
> >
> > Actually, if we're going to revamp how we handle error messages I'd
> > like to see us move more towards a model where we can print errors
> > in multiple languages.
> >
> > Most modern vendor compilers already do this; GCC never tried because
> > RMS opposed numbering warnings/errors (which is how multi-language
> > errors work).
One feature that I have seen in a commercial compiler that I think was
quite nice was that, thanks to the fact that all the errors and warnings
were numbered, one could enable/disable specific warnings, or turn
specific warnings into errors etc. This allows for a much better
finetuning than with all those -W options that we currently have in GCC.
Another similar thing I've seen in this compiler was that one could
manipulate the messages on per-sourceline basis, with a special #pragma
directive. So, for example, if a compiler was incorrectly warning about
an operation that it found suspicious, one could surround the offending
line with #pragma directives that would disable the particular warning for
the single line. I don't know how feasible this is in GCC, but it would
certainly be a useful thing. After all, many organizations require the
code to compile without any warnings. Since in some situations some
warnings are very difficult to avoid, people tend to disable the
particular set of warnings altogether, with -Wno-<whatever> options,
potentially loosing a mostly useful diagnostics.
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets GCC maintainer UNIX system administrator |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /
More information about the Gcc
mailing list