This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
gcov 4.0 incorrectly marking lines as executable
- From: Martin Reddy <reddy at pixar dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 25 Oct 2005 12:16:53 -0700 (PDT)
- Subject: gcov 4.0 incorrectly marking lines as executable
We are seeing lots of problems with gcov 4.0.1 and were wondering if anyone
else has seen these and can offer some help. We are seeing cases where lines
with no executable code on them are being incorrectly marked as executable
and therefore also marked with zero coverage. For example, a class statement,
or a closing curly brace, or a line of code that is directly after a simple
statement that is marked as covered, or a line that is beyond the end of a
source file. For example, here is a .gcov file snippet (where ##### means the
line is executable but has not been hit):
-: 7:
#####: 8:class ClassName {
-: 9:
-: 10: public:
or this case where the return statement directly after the for loop is marked
as not being covered:
18: 507: for (int i = 0; i < 8; i++)
16: 508: corners[i] = m.transform(corners[i]);
-: 509:
#####: 510: return corners;
or the following, where "/*EOF*/" is not in the source file and is added by
gcov to indicate that the line is beyond the end of the file:
#####: /*EOF*/
Has anyone seen this sort of thing before?
(We're compiling 64-bit (x86-64) on Fedora Core 2 under kernel 2.6.8 and
using the Boost C++ libraries if that makes any difference.)
Cheers,
Martin.
---------------------------------------------------------------------------
Martin Reddy Pixar Animation Studios
1200 Park Avenue
reddy@pixar.com Emeryville, CA 94608
http://MartinReddy.net/ Tel. (510) 752 4093