This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] caret diagnostics (was: broken FE diagnostics wrt complex expressions)
On Thu, 14 Aug 2008, Manuel López-Ibáñez wrote:
> It is controlled by -fdiagnostics-show-caret. See the diff for gcc/opts.c.
>
> The configure options are meant to enable/disable all code related to
> caret printing in a similar way as it was done with mapped locations.
> This was requested the first time I sent this patch because it was
> considered too experimental to have it even with
> -fno-diagnostics-show-caret as the default.
Mapped locations were sitting around on trunk for a long time as a
bitrotten feature; I don't think that's a good example here. When the
code works and passes review it should go on trunk, default remaining the
present diagnostic style according to the GNU Coding Standards, no
configure option.
I don't think the option should necessarily just be boolean; once choice
that may make sense would be caret diagnostics for the first diagnostic
from an input file only, to avoid blowing up the output size when one
mistake causes a cascade of diagnostics. (This is a matter of designing
the option as e.g. -fdiagnostics-show-caret={no,yes,first} rather than as
-f/fno-, not a matter of needing such a feature implemented in the first
version going on trunk.)
--
Joseph S. Myers
joseph@codesourcery.com