This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Caret diagnostics

Attached a new version of the patch:

* It uses  the default cutoff as max_width, whatever it is (as
controlled by -fmessage-length).
* It uses the pretty-printer. The text cannot (should not) wrap
because we still print only max_width chars at most.
* It removes unnecessary prune patterns.

Bootstrapped and regression tested with languages=all,ada,obj-c++.



2012-04-09  Manuel López-Ibáñez  <>
	PR 24985
	* testsuite/lib/prune.exp: Handle caret.
	* testsuite/lib/libmudflap.exp: Handle caret.
        * diagnostic.h (show_caret): Declare.
	(diagnostic_show_locus): Declare.
        * diagnostic.c (diagnostic_initialize): Initialize to false.
        (diagnostic_show_locus): New.
        (diagnostic_report_diagnostic): Call it.
        * 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.
        * lib/prune.exp: Add -fno-diagnostics-show-caret.

Attachment: caret-diagnostics-20120409.diff
Description: Binary data

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]