This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcov and C++'s global destructors



> I am trying to use gcov in conjunction with unit testing to find out
> which lines of code were not yet covered by the tests.  Alas, I found out 
> that those lines that were called by destructors of global variables
> were assumed to be not executed at all.  Example code is appended.

Probably what is happening is that the routine that dumps the gcov
statistics is being called before the calls to destructors to global
variables are executed.

> My GCC version is: gcc version 2.95.3 20010315 (SuSE) on Intel.
> 
> Does someone know how to make this work?  I didn't find something in the
> documentation or mailing list archives concerning this issue.

I don't know if there is an easy fix or not.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]