Re: [ccache] Support for color diagnostics

2013-11-29 Thread Lubos Lunak
On Friday 29 of November 2013, Lubos Lunak wrote:
  Hello,

  the attached patch adds ccache support for compiler color diagnostics
 (also reported by somebody as #10075).
...
 Caveats:

 I forgot one:

- The function color_output_possible() may look simplistic, but as far as I 
can tell it works just fine (it's been in Incecream for a number of years).

-- 
 Lubos Lunak
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Support for color diagnostics

2013-11-29 Thread Loïc Yhuel

Le 29/11/2013 14:08, Lubos Lunak a écrit :

On Friday 29 of November 2013, Lubos Lunak wrote:

  Hello,

  the attached patch adds ccache support for compiler color diagnostics
(also reported by somebody as #10075).

...

Caveats:

  I forgot one:

- The function color_output_possible() may look simplistic, but as far as I
can tell it works just fine (it's been in Incecream for a number of years).


Hello,

I think you didn't understand GCC documentation correctly.

From the man page : The default GCC_COLORS is ... Setting GCC_COLORS 
to the empty string disables colors.

GCC enable colors when GCC_COLORS is not set, and your code doesn't.

In fact you don't have to test GCC_COLORS at all : when it's an empty 
string (not unset !), colors are disabled , and adding 
-fdiagnostics-color doesn't change anything.

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache