On 01/13/2016 01:57 AM, David Malcolm wrote:
There are five places in trunk that can call diagnostic_show_locus.
I'd kind of like to see before/after example output for all of these, to make sure that we are indeed removing only unnecessary newlines.
The final caller of diagnostic_show_locus: diagnostic_append_note_at_rich_loc is unused, so the patch deletes it.
That is ok as obvious.
The patch required removing this assertion from pp_output_formatted_text: gcc_assert (buffer->line_length == 0);
with colorization - after printing the source code, the colorizer prints color codes to disable colorization *after* the newline,
I don't suppose that can be switched around to keep the assertion?
Verifying the absence of newlines seemed tricky to do from DejaGnu, so I added test coverage for this via a plugin.
Ugh. Can it be this hard? I thought expect was designed to check output exactly. This might not fit in the dg-* framework too well, but IMO it would be better to check real compiler output than muck about with plugins if at all possible.
Bernd