gcov misses 'do' line in 'do {...} while(...)' loop?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux