https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121943

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I wonder if there is an order issue going on. The colorize_init is called
before processing of -fdiagnostics-plain-output .

and yes this is a mingw issue only.

Can you test the following patch:
```
[apinski@xeond2 diagnostics]$ git diff color.cc
diff --git a/gcc/diagnostics/color.cc b/gcc/diagnostics/color.cc
index 7b499fea852..bed61ab3f8c 100644
--- a/gcc/diagnostics/color.cc
+++ b/gcc/diagnostics/color.cc
@@ -297,6 +297,7 @@ static bool
 should_colorize (void)
 {
 #ifdef __MINGW32__
+  return false;
   /* For consistency reasons, one should check the handle returned by
      _get_osfhandle(_fileno(stderr)) because the function
      pp_write_text_to_stream() in pretty-print.cc calls fputs() on

```
Yes that disable colorization for now but I am testing a theory that doing:
      /* Try to enable processing of VT100 escape sequences */
      mode |= ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING;
      SetConsoleMode (handle, mode);


Is causing the sequence to be outputted here.

Reply via email to