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++.

Cheers,

Manuel.

2012-04-09  Manuel López-Ibáñez  <m...@gcc.gnu.org>
        PR 24985
libstdc++-v3/
        * testsuite/lib/prune.exp: Handle caret.
libmudflap/
        * testsuite/lib/libmudflap.exp: Handle caret.
gcc/
        * 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.
testsuite/
        * lib/prune.exp: Add -fno-diagnostics-show-caret.

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

Reply via email to