This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/12076] gcov misreports coverage of return statement [NVR]
- From: "jbuck at welsh-buck dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2006 22:33:19 -0000
- Subject: [Bug c++/12076] gcov misreports coverage of return statement [NVR]
- References: <bug-12076-6823@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #13 from jbuck at welsh-buck dot org 2006-01-21 22:33 -------
Subject: Re: gcov misreports coverage of return statement
[NVR]
On Thu, 2005-10-27 at 01:41 +0000, reddy at pixar dot com wrote:
>
> ------- Comment #12 from reddy at pixar dot com 2005-10-27 01:41 -------
> Having code coverage emit a "-" instead of "#####" in this case sounds
> appropriate and would certainly solve the problem for me.
>
> Is there a way to workaround this issue by reorganizing code, or something
> else, so that I can fool the NVR smarts into not getting invoked in this
> particular case?
The -fno-elide-constructors flag helps; it forces explicit copy constructor
calls, and that seems to get rid of most of the bogons -- but apparently
not all of them -- I'll look further, but I think sometimes the
initializer for a base class gets optimized in a way that results in a
false ###### flagging. Still, if you're having this trouble, start with
that flag.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076