#include <string> // this global string causes gcov to think there's executable lines // beyond the end of the file, and that they have not been executed std::string globalVar = ""; std::string doSomething() { // instantiating this string and calling a method on it causes the // 'return' line to be marked as having never been executed std::string localVar; localVar.size(); return localVar; } int main(int, char **) { doSomething(); return 0; } produces the wrong results: a) it says that the return is never called b) it executes past the end of the file
And this is why people should not confirm their own bugs :). *** This bug has been marked as a duplicate of 12076 ***
Yeah, probably. Bah.