From: David Malcolm Date: Tue, 30 Sep 2025 21:23:32 +0000 (-0400) Subject: diagnostics::output_spec: fix "color" in "text" output scheme X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5b5dba90232bd31caa072c1e26fd8c11bfe0a5f0;p=thirdparty%2Fgcc.git diagnostics::output_spec: fix "color" in "text" output scheme The previous refactoring highlighted that we were ignoring the "color" key within the "text" output scheme for diagnostics. Fixed thusly. gcc/ChangeLog: * diagnostics/output-spec.cc (text_scheme_handler::make_sink): Use the value of the "color" to determine if the sink's printer is colorized. Signed-off-by: David Malcolm --- diff --git a/gcc/diagnostics/output-spec.cc b/gcc/diagnostics/output-spec.cc index 29f53771fb7..28ea044fcc7 100644 --- a/gcc/diagnostics/output-spec.cc +++ b/gcc/diagnostics/output-spec.cc @@ -418,7 +418,7 @@ text_scheme_handler::make_sink (const context &ctxt, sink->set_show_nesting (opts.m_show_nesting); sink->set_show_locations_in_nesting (opts.m_show_locations_in_nesting); sink->set_show_nesting_levels (opts.m_show_levels); - // FIXME: what about show_color? + pp_show_color (sink->get_printer ()) = opts.m_show_color; return sink; }