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

你离开我真会死。 提交于 2021-01-27 10:40:08

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/36037451/why-do-i-get-has-arcs-from-exit-block-messages-when-running-gcov

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!