Re: gcov coverage on template classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Nava,

>So, not in the code. Are you saying template methods are inline by default?

No.  Inline methods defined in a class declaration are inlined by default.

For example:

class Foo
{
public:
  void ThisMethodIsInlinedByDefault() { }
};

Since Foo::ThisMethodIsInlinedByDefault was declared implicitly inline -- by
virtue of being defined in the class declaration -- it is inline by default.

Same rule applies to template classes, as far as I know.

> ok, so there's no way to force the compiler to emit all methods for any
> template class that is instantiated?

Hopefully there is one-or-more -f flags that will control the code emission
that you are looking for.

> The ones I found were: -fkeep-inline-functions -fno-default-inline

Did those resolve your issue?

> are there others which I should be trying?

Perhaps.  I don't know.

> Thanks for your suggestions.

No problem.  :-)

Sincerely,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux