GCov showing closing braces as not executed

Viewed 153

Having an issue with producing accurate gcov results, code is compiled with gcc (version 4.4.7) -g, no optimization. I'm getting accurate coverage on functions with the except of constructors

CPPFLAGS += --coverage -O0
LDFLAGS += -lgcov --coverage

I get the following results meaning the last curly brace of my constructor is not covered:

   1: TestClass::TestClass(bool val)
   -:    :TestClass2_(val)
   1: {
   -:
##### }

In addition, if the constructor is specified as an explicit constructor in the header file, it will also result in the last curly brace of the constructor being marked as non-executed.

Any suggestions?

0 Answers
Related