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?
2 Answers
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

- 602
- 7
- 22
I got this issue recently, and wanted to add a piece of information in addition to @tutejszy 's answer
If you are cross-compiling your code (or using a toolchain that is not the default installed one), you will need to use this particular toolchain gcov.
And if you want to use lcov on just created gcov objects, you will need to specify the path of the toolchain gcov using option --gcov-tool <path to gcov>
when running lcov

- 117
- 1
- 6