views:

409

answers:

3

For some long errors, the gcc output is dense and has lots of line-wrapping etc. Especially when errors are subtle, it can take me 10-30 seconds of squinting to parse it with my eyes.

I've taken to pasting this in an open code-editor window to get some basic syntax highlighting and enable reformatting with regex's.

Has anyone invented a more automated method?

+3  A: 

If your errors are template related, take a look at STLfilt:

Michael Burr
Michael, same story as comment to Mr. Fooz's answer above. Your answer was first and it was dead-on -- those template errors are exactly what inspired my post. I'll be using STLfilt from tomorrow until I die.BTW I voted both of you up using my new, functional account. Thanks again.
mikeh
FWIW, I find that there's no need for something like STLfilt with MS's newer compilers - they give quite readable error messages right out of the box now.
Michael Burr
+5  A: 

I've found colorgcc to be invaluable. By introducing coloring, it becomes much easier to mentally parse the text of gcc error messages, especially when templates are involved.

Mr Fooz
Hey, I posted that with a temp account and now I can't follow up with it, but I wanted to say thanks for this -- that is an awesome utility and just the sort I was looking for.
mikeh
Glad to be of service.
Mr Fooz
A: 

gccfilter does coloring & simplification of messages.

http://www.mixtion.org/gccfilter/

migou