[LLVMdev] Turning off color in clang error mesages?

Chris Lattner clattner at apple.com
Tue Mar 2 15:14:44 PST 2010


On Mar 2, 2010, at 2:58 PM, Vladimir G. Ivanovic wrote:

> Is it possible to turn off the colorizing of clang error messages? The
> reason I ask is that using clang in an XEmacs buffer results in user
> unfriendly output like this:

It is -fno-color-diagnostics.

-Chris

> 
> $ clang -c -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts
> -Wpacked -Wshadow -Wmissing-declarations -Wmissing-prototypes
> -Wstrict-prototypes -Wdeclaration-after-statement  -Wunused-parameter
> -ggdb  -march=native -mtune=native  -Demacs -I.
> -I/usr/local/src/xemacs-beta/src -DHAVE_CONFIG_H
> -I/usr/include/freetype2 doprnt.c
> [1mdoprnt.c:127:7:  [0m [0;1;35mwarning:  [0m [1mexpression result
> unused [-Wunused-value]
> [0m      Lstream_putc (lstr, zero_flag ? '0' : ' ');
> [0;1;32m      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [0mIn file included from doprnt.c:34:
> ./lstream.h:332:34: note: instantiated from:
>    Lstream_flush_out (stream) : 0))
> [0;1;32m                                 ^
> [0m [1mdoprnt.c:136:7:  [0m [0;1;35mwarning:  [0m [1mexpression result
> unused [-Wunused-value]
> [0m      Lstream_putc (lstr, zero_flag ? '0' : ' ');
> [0;1;32m      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [0mIn file included from doprnt.c:34:
> ./lstream.h:332:34: note: instantiated from:
>    Lstream_flush_out (stream) : 0))
> [0;1;32m                                 ^
> [0m2 diagnostics generated.
> 
> If the answer is "no", then perhaps someone could point me to the place
> in the code that writes out error messages, and I'll try and hack XEmacs
> support in.
> 
> Thanks.
> 
> --- Vladimir
> 
> -- 
> Vladimir G. Ivanovic                            http://www.leonora.org
> +1 650 450 4101                                       vladimir at acm.org
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list