-
- Downloads
opts.c: Include diagnostic-color.h.
* 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. From-SVN: r197841
Showing
- gcc/ChangeLog 31 additions, 0 deletionsgcc/ChangeLog
- gcc/Makefile.in 6 additions, 4 deletionsgcc/Makefile.in
- gcc/c-family/ChangeLog 6 additions, 0 deletionsgcc/c-family/ChangeLog
- gcc/c-family/c-format.c 11 additions, 7 deletionsgcc/c-family/c-format.c
- gcc/common.opt 24 additions, 0 deletionsgcc/common.opt
- gcc/cp/ChangeLog 6 additions, 0 deletionsgcc/cp/ChangeLog
- gcc/cp/error.c 20 additions, 18 deletionsgcc/cp/error.c
- gcc/diagnostic-core.h 1 addition, 1 deletiongcc/diagnostic-core.h
- gcc/diagnostic.c 34 additions, 8 deletionsgcc/diagnostic.c
- gcc/diagnostic.def 13 additions, 13 deletionsgcc/diagnostic.def
- gcc/doc/invoke.texi 71 additions, 0 deletionsgcc/doc/invoke.texi
- gcc/dwarf2out.c 1 addition, 0 deletionsgcc/dwarf2out.c
- gcc/langhooks.c 4 additions, 4 deletionsgcc/langhooks.c
- gcc/opts.c 6 additions, 0 deletionsgcc/opts.c
- gcc/pretty-print.c 40 additions, 6 deletionsgcc/pretty-print.c
- gcc/pretty-print.h 6 additions, 0 deletionsgcc/pretty-print.h
Loading
Please register or sign in to comment