Gcov reporting that return statement is not hit

旧巷老猫 提交于 2019-12-07 09:48:26
Ronaldo Nazarea

Try using the -fno-elide-constructors switch in g++

From The Definitive Guide to GCC:

-fno-elide-constructors: This option when compiling C++ options causes GCC not to omit creating temporary objects when initializing objects of the same type, as permitted by the C++ standard. Specifying this option causes GCC to explicitly call the copy constructor in all cases.

Some discussions here: How can I get more accurate results from gcov? and here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12076

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