title: Is gcc -fdiagnostics-colour working on Windows?
body: <p>I am using Windows 7, and in both the mintty (Cygwin) and Windows Command Prompt terminals, I don't get any colour for MinGW GCC error messages.</p>
  
  <pre><code>$ printenv GCC_COLORS
  error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01
  $ gcc -c -fdiagnostics-color=always file.cpp -o file.o
  </code></pre>
  
  <p>For both terminals, I can see colour when I use git commands, so the terminals are fine themselves. I can use the same GCC command in Ubuntu Linux (GCC 4.9) without the GCC_COLORS environment variable, and the colouring does work.</p>
  
  <p>I sourced my MinGW GCC 5.2 from <a href="https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/dongsheng-daily/" rel="nofollow">https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/dongsheng-daily/</a>, probably the gcc-5-win32 (stable).</p>
  
  <p><code>gcc -v</code> gives:</p>
  
  <pre><code>Target: i686-w64-mingw32
  Configured with: /home/drangon/work/mingw-w64-dgn_32/source/gcc-5.2.0/configure --host=i686-w64-mingw32 --target=i686-w64-mingw32 --disable-nls --enable-languages=c,c++,objc,obj-c++ --with-gmp=/home/drangon/work/mingw-w64-dgn_32/build/for_target --with-mpfr=/home/drangon/work/mingw-w64-dgn_32/build/for_target --with-mpc=/home/drangon/work/mingw-w64-dgn_32/build/for_target --with-isl=/home/drangon/work/mingw-w64-dgn_32/build/for_target --enable-twoprocess --disable-libstdcxx-pch --disable-win32-registry --prefix=/home/drangon/work/mingw-w64-dgn_32/target --with-sysroot=/home/drangon/work/mingw-w64-dgn_32/target
  Thread model: win32
  gcc version 5.2.0 (GCC)
  </code></pre>
  
  <p>I saw this ticket about this very issue was closed because it was working for someone.
  <a href="https://sourceforge.net/p/mingw-w64/feature-requests/66/" rel="nofollow">https://sourceforge.net/p/mingw-w64/feature-requests/66/</a></p>
  
  <p><strong>How do I get the error colouring working?</strong></p>
  
  <p>(I did try the gcc-5-win64, which has the same issue... and also <code>clang -fcolor-diagnostics</code> fails, with Clang 3.7.1 sourced from: <a href="http://llvm.org/releases/download.html#3.7.1" rel="nofollow">http://llvm.org/releases/download.html#3.7.1</a>)</p>