This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r197841 - in /trunk/gcc: ChangeLog Makefile.in ...
- From: jakub at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Fri, 12 Apr 2013 06:19:58 -0000
- Subject: r197841 - in /trunk/gcc: ChangeLog Makefile.in ...
Author: jakub
Date: Fri Apr 12 06:19:58 2013
New Revision: 197841
URL: http://gcc.gnu.org/viewcvs?rev=197841&root=gcc&view=rev
Log:
* opts.c: Include diagnostic-color.h.
(common_handle_option): Handle OPT_fdiagnostics_color_.
* Makefile.in (OBJS-libcommon): Add diagnostic-color.o.
(diagnostic.o, opts.o, pretty-print.o): Depend on diagnostic-color.h.
(diagnostic-color.o): New.
* common.opt (fdiagnostics-color, fdiagnostics-color=): New options.
(diagnostic_color_rule): New enum.
* dwarf2out.c (gen_producer_string): Don't print -fdiagnostics-color*.
* langhooks.c (lhd_print_error_function): Add %r "locus" and %R around
the location string.
* diagnostic.def: Add 3rd argument to DEFINE_DIAGNOSTIC_KIND macros,
either NULL, or color kind.
* diagnostic-color.c: New file.
* diagnostic-color.h: New file.
* diagnostic-core.h (DEFINE_DIAGNOSTIC_KIND): Adjust macro for 3
arguments.
* doc/invoke.texi (-fdiagnostics-color): Document.
* pretty-print.h (pp_show_color): Define.
(struct pretty_print_info): Add show_color field.
* diagnostic.c: Include diagnostic-color.h.
(diagnostic_build_prefix): Adjust for 3 argument DEFINE_DIAGNOSTIC_KIND
macros. Colorize error:, warning: etc. strings and also the location
string.
(diagnostic_show_locus): Colorize the caret line.
* pretty-print.c: Include diagnostic-color.h.
(pp_base_format): Handle %r and %R format specifiers. Colorize strings
inside of %< %> quotes or quoted through q format modifier.
c-family/
* c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
specifiers.
cp/
* error.c (cp_print_error_function,
print_instantiation_partial_context_line,
maybe_print_constexpr_context): Colorize locus strings.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-format.c
trunk/gcc/common.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/diagnostic-core.h
trunk/gcc/diagnostic.c
trunk/gcc/diagnostic.def
trunk/gcc/doc/invoke.texi
trunk/gcc/dwarf2out.c
trunk/gcc/langhooks.c
trunk/gcc/opts.c
trunk/gcc/pretty-print.c
trunk/gcc/pretty-print.h