This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcov coverage on template classes
- From: "John (Eljay) Love-Jensen" <eljay at adobe dot com>
- To: Nava Whiteford <new at sgenomics dot org>
- Cc: GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 26 Feb 2009 06:51:37 -0800
- Subject: Re: gcov coverage on template classes
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