From 5a9830842f69ebb059061e26f8b0699cbd85121e Mon Sep 17 00:00:00 2001 From: manu Date: Wed, 11 Apr 2012 09:26:48 +0000 Subject: =?UTF-8?q?2012-04-11=20=20Manuel=20L=C3=B3pez-Ib=C3=A1=C3=B1ez=20?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186305 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/pretty-print.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/pretty-print.h') diff --git a/gcc/pretty-print.h b/gcc/pretty-print.h index bb1d156d31d..a7b5a9fbbba 100644 --- a/gcc/pretty-print.h +++ b/gcc/pretty-print.h @@ -201,6 +201,9 @@ struct pretty_print_info #define pp_set_line_maximum_length(PP, L) \ pp_base_set_line_maximum_length (pp_base (PP), L) #define pp_set_prefix(PP, P) pp_base_set_prefix (pp_base (PP), P) +#define pp_get_prefix(PP) pp_base_get_prefix (pp_base (PP)) +static inline const char * +pp_base_get_prefix (const pretty_printer *pp) { return pp->prefix; } #define pp_destroy_prefix(PP) pp_base_destroy_prefix (pp_base (PP)) #define pp_remaining_character_count_for_line(PP) \ pp_base_remaining_character_count_for_line (pp_base (PP)) -- cgit v1.2.1