Search code examples
gcov

Why do I get "has arcs from exit block" messages when running gcov?


I am running gcov to measure coverage but I get "has arcs from exit block" message for each of the functions I use in the c code. Is there any problem with this message? Should I ignore them?


Solution

  • This can mean that your gcno file has been generated with newer/different version of gcc compiler. See if at the beginning you have also warning like 'version '404*', prefer '402*' If yes, solution below:

    Check if g++ --version and gcov --version give you the same results. If not, update your tools like sudo apt-get install gcov, or specific version like `sudo apt-get install gcc-4.7.

    If you have many versions of gcc installer you can switch between them using update-alternatives:

    Query (what do you have) example: sudo update-alternatives --query gcc.

    Add/make changes example: sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 60