Dear list,
I just recently got GCC 4.8 since Debian updated their Testing repository
with it, and noted the error message source line display which was added.
I then also noted it in the release notes, and while it seems to have been
a commonly requested feature, I thought I'd offer some critique against
it.
I find that the vast majority of error causes are obvious when one goes to
the indicated line number (which one has to do anyway to fix it) and
simply looks at the line, so I find the source line and caret display to
be superfluous (and the column number is included in the main error line
anyway). On the other hand, they make every error message take up three
lines of screen-space instead of just one, where more error messages could
be display instead. Summa summarum, I find that they merely make the error
and warning output needlessly verbose, while adding nothing that I find of
value.
I did find that there is the `-fno-diagnostics-show-caret` to turn them
off, but it's quite bothersome to have to specify that every single time I
compile something, and passing it through Makefiles' CFLAGS options
shadows other flags that are turned on by default. It's also rather long
and as such obscures the main command. As far as I know, there's no way to
set these options "by default" for GCC, either via environment variables
nor via some configuration file. Though, if I'm wrong on this, please
correct me.
It would make me happy if something were done to address this. It seems it
wouldn't be appreciated to have them disabled by default, but it would at
least be quite nice to have some way to turn them off "globally" via some
kind of configuration. I cannot pretend to know what method the GCC
community would prefer, however.
Thanks for reading!
--
Fredrik Tolf