gccfilter
is a perl filter to colorize and simplify (or expand)
gcc diagnostic messages.
gccfilter
is particularly aimed at g++
(i.e. dealinging with C++) messages which can contain lot of
template-related errors or warnings difficult to sort out.
Features:
There exists a somewhat similar tool colorgcc
(http://schlueters.de/colorgcc.html).
However it seems to be unmaintained for years now and does only coloring.
Note that the script relies on several perl modules, namely:
So far it also requires perl version 5.9.4 or above (for the "state" keyword).
Download the script: http://www.mixtion.org/gccfilter/gccfilter and put it somewhere in your $PATH.
The man page is integrated in the file (type gccfilter -m
),
or available in HTML here: http://www.mixtion.org/gccfilter/gccfilter.html
Emmanuel Le Trong, <manu@mixtion.org>
Compiling this test program:
class A {}; class B {}; int main () { A a(&B()); }
(Note that colors are customizable. These are the built-in defaults)
The test program comes from pegtl (http://code.google.com/p/pegtl/) which heavily uses some advanced template mecanisms. (I introduced the error.)
As is:
The same colored, without "with" clauses, template arguments, instanciation chains, paths and namespaces:
update: 2010-10-21, Copyright 2010 by Emmanuel Le Trong.