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


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


I'm not 100% sure, but I think the linker also discards unused methods, so you might have managed to get gcc to emit the unused methods (I don't recall details, but I think that is easy to do) but still not have then in the executable because the linker discarded them.


You could create and check a .o file to see whether the compiler emitted them. If it did, I think there is a linker option to prevent the linker from discarding them.


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