On 10 April 2012 00:28, Jason Merrill <ja...@redhat.com> wrote:
> On 04/09/2012 04:01 PM, Manuel López-Ibáńez wrote:
>>
>> * 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.
>
>
> Hmm, I think if pp_line_cutoff is 0 and we're on a terminal, we still want
> to use COLUMNS to limit how much of the source we print.

Like this?

2012-04-05  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.
        (caret_max_width): Declare.
        (diagnostic_show_locus): Declare.
        (diagnostic_set_caret_max_width): Declare.
        * diagnostic.c (diagnostic_initialize): Initialize to false.
        (diagnostic_show_locus): New.
        (diagnostic_report_diagnostic): Call it.
        (getenv_columns): 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.

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

Reply via email to