aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorManuel López-Ibáñez <manu@gcc.gnu.org>2012-04-11 09:26:48 +0000
committerManuel López-Ibáñez <manu@gcc.gnu.org>2012-04-11 09:26:48 +0000
commit9034a3c102ac96000acce080e72d721a02e925c1 (patch)
tree9e780906c85f6be0ad543abba26314c0c15e5512 /gcc/toplev.c
parentbb268593e0648dd3e976e766d88171b866439bc4 (diff)
2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR 24985 gcc/ * diagnostic.h (show_caret): Declare. (caret_max_width): Declare. (diagnostic_show_locus): Declare. * diagnostic.c (diagnostic_initialize): Initialize to false. (diagnostic_show_locus): New. (diagnostic_report_diagnostic): Call it. (getenv_columns): New. (adjust_line): New. (diagnostic_set_caret_max_width): New. * input.c (read_line): New. (location_get_source_line): New. * input.h (location_get_source_line): Declare. * toplev.c (general_init): Initialize show_caret from options. * dwarf2out.c (gen_producer_string): Handle fdiagnostics-show-caret. * opts.c (common_handle_option): Likewise. * pretty-print.h (pp_get_prefix): New. (pp_base_get_prefix): New. * common.opt (fdiagnostics-show-caret): New option. * doc/invoke.texi (fdiagnostics-show-caret): Document it. testsuite/ * lib/prune.exp: Add -fno-diagnostics-show-caret. libstdc++-v3/ * testsuite/lib/prune.exp: Handle caret. libmudflap/ * testsuite/lib/libmudflap.exp: Handle caret. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@186305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index e01ed814100..51d52e1c8dd 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1169,6 +1169,8 @@ general_init (const char *argv0)
/* Set a default printer. Language specific initializations will
override it later. */
pp_format_decoder (global_dc->printer) = &default_tree_printer;
+ global_dc->show_caret
+ = global_options_init.x_flag_diagnostics_show_caret;
global_dc->show_option_requested
= global_options_init.x_flag_diagnostics_show_option;
global_dc->show_column