Windows terminal and mintty both have support for link escape sequences, and so
should follow the same detection logic as the rest of the hosts. With
conhost.exe, the embedded URLs are not supported, but it doesn't cause any
problems to print them.

gcc/ChangeLog:
        * diagnostic-color.cc (auto_enable_urls): Don't hardcode to return
        false on mingw hosts.

Signed-off-by: Peter Damianov <peter0...@disroot.org>
---
 gcc/diagnostic-color.cc | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/gcc/diagnostic-color.cc b/gcc/diagnostic-color.cc
index 0a4845406f5..e9183bb293d 100644
--- a/gcc/diagnostic-color.cc
+++ b/gcc/diagnostic-color.cc
@@ -292,9 +292,6 @@ parse_env_vars_for_urls ()
 static bool
 auto_enable_urls ()
 {
-#ifdef __MINGW32__
-  return false;
-#else
   const char *term, *colorterm;
 
   /* First check the terminal is capable of printing color escapes,
@@ -336,7 +333,6 @@ auto_enable_urls ()
     return false;
 
   return true;
-#endif
 }
 
 /* Determine if URLs should be enabled, based on RULE,
-- 
2.39.2

Reply via email to