This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcov and C++'s global destructors
- From: Joe Buck <jbuck at synopsys dot COM>
- To: schween at snafu dot de
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 11 Jan 2002 09:57:34 -0800 (PST)
- Subject: 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.