title: What are your tips for interpreting gcov output in order to improve coverage?
body: <p>I'm successfully using gcov in my project:</p>
  
  <ul>
  <li>I can build my project with gcov flags: <code>-fprofile-arcs -ftest-coverage</code></li>
  <li>I link with the <code>-lgcov</code> option</li>
  <li>I run my unit test program and lots of <code>gcda</code> and <code>gcno</code> files are produced.</li>
  <li>I run gcov lots of times and lots of <code>gcov</code> files are produced.</li>
  <li>I summarise the results and produce a list of lines like this:
  <ul>
  <li><code>#####: 42: virtual double run_time() const { return 0; }</code></li>
  </ul></li>
  </ul>
  
  <p>I then go 'doh!' and write a test which calls that missing method.</p>
  
  <p>The above example line is quite easy to diagnose - gcov told me the exact method I was not calling.</p>
  
  <p>I've also had an example of a copy constructor being flagged by gcov, but I'm able to step through it using my Visual Studio debugger.  The solution there was to realise that gcov was suffering from RVO which elided the copy, but writing a test which forced a copy fixed that.</p>
  
  <p>I have a couple of other examples which I cannot figure out:</p>
  
  <pre><code>1.
  File.cpp
  #####: 78:}
  </code></pre>
  
  <p>gcov seems to be flagging the close brace of a namespace which is the last line of a file.</p>
  
  <pre><code>2.
  File.h
  #####: 33:  class FooBase: public IResult {
  </code></pre>
  
  <p>What is gcov trying to tell me here?  I can't think of a call to make here.<br>
  <strong>Update 1:</strong> I've detected that <code>FooBase</code> has a default constructor, which if only 'called' by a subclass is not the same as calling it by instantiating it, as far as <code>gcov</code> is concerned.</p>
  
  <p><strong>Update 2:</strong> I've been using <code>djgpp/gcc 4.4.4</code> which produced the above results.  However, by using <code>MinGW/gcc 4.5.2</code> the 'aberrations' disappear and with a little more work I've been able to get to 100% line coverage.</p>
  
  <p>Please write your answers with either a single tip for the unwary gcov user, or an answer to one of my examples.</p>