------- Comment #11 from pva at gentoo dot org  2008-05-07 06:54 -------
(In reply to comment #9)
> The other issue here is that people want different colors for each of their
> warnings so why hardcode it.

It should be easy to make this configurable...

Well I've googled a bit and did not found any simple library to abstract from
color codes. Thus I've looked at cmake sources which colorizes it's output and
found that they do everything by themselves. By default (if not disabled
through command line and if test for cases where colors are not support fail)
they enable colors supposing that they have vt100 terminal and colorize output.
Take a look at kwsys/Terminal.c - the code itself is small and clear... This
does not seem to be a hard task to implement something similar in gcc.

(In reply to comment #10)
> you can't just grep for "warning:" and change it to "\033[01;32warning:", it's
> much more involved.

Oh, no. Not taking into account that you'll have to rebuild gcc every time you
decide to change colors, things like output or not colors should be decided at
runtime (looking at $TERM) as on terminals which do not support colors output
became unreadable...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36150

Reply via email to