* gcov misses 'do' line in 'do {...} while(...)' loop?
@ 2020-03-25 19:14 Dan Krejsa
0 siblings, 0 replies; only message in thread
From: Dan Krejsa @ 2020-03-25 19:14 UTC (permalink / raw)
To: gcc-help
Hi,
I'm using gcov on Arch linux
$ gcov --version
gcov (Arch Linux 9.2.1+20200130-2) 9.2.1 20200130
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.
via the google test / mock framework.
I have a C file containing a function with a 'do' loop in the following
format:
do
{
/* various statements in here */
}
while (condition);
and in the corresponding .gcov file for the test, the line with 'do' is
shown
as un-executed, while the statements in the body of the loop are shown as
executed multiple times. As a result, less than 100% coverage is reported
for this function by the test suite.
Is this kind of thing considered a bug in gcov?
- Dan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-25 19:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-25 19:14 gcov misses 'do' line in 'do {...} while(...)' loop? Dan Krejsa
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).