This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcov coverage on template classes


> You are defining template class methods as inline.

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

> An inline method that is not used is not emitted.  (Similarly, just as an
> uninstantiated template is not emitted.)

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

> There are some -f flags which may affect the generation of inline routine as
> not-inline even if not referenced, and/or a -f flag which may affect the
> generation of all template inline methods.  Perhaps one-or-more of those
> flags will be required to generate the unreferenced inline code.

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

are there others which I should be trying?

Thanks for your suggestions.

> 
> Refer to GCC documentation (man gcc).
> 
> HTH,
> --Eljay


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]