Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suppress candidates suggested by GCC

I'm using gcc 4.7.2. My code is rather heavy on template and boost usage. When I compile and I've defined or used something ambiguous, I often get error messages that suggest two dozen candidates, usually defined in their separate "in file included from [some deep path]:", with corresponding error messages per candidate on why that particular candidate fails. Especially using boost and templates, even a single error like this becomes completely unintelligible.

My question:

Is there an option to control how deep the search for suitable candidates goes?

Ideally, I'd like it turned off, or at least reduce it to only the first one or two candidates -- the rest of the candidates is usually pretty useless anyway.

like image 200
Rody Oldenhuis Avatar asked Nov 13 '22 19:11

Rody Oldenhuis


1 Answers

I use gccfilter to make template errors much more readable. From the website:

Features:

  • coloring of diagnostic messages (with customizable colors),
  • simplification of templated programs output: removal of "with" clauses, template arguments,
  • inline replacement of template arguments by their values,
  • removal of namespaces,
  • removal of instantiation chains.
like image 105
ehuang Avatar answered Dec 20 '22 07:12

ehuang