Fixed issue under gcov 8 where an un-hit section could overwrite a hit in templated code #315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Hi,
When working with GCC 8 (ref #228) I found a bug whereby if the gcov file is arranged thus:
instead of:
then the line in question is flagged as un-hit, because the un-hit indicator
####
occurs after the hit indicator. In addition, if there are multiple instantiations of the template with different types only the hit count for the last one is used.I've modified an existing test to demonstrate & test the first issue, and validated that the change fixes the issue I see in my code as well. I have done my best to understand and follow the contributions rules and have run the build under Travis CI to verify the changes I've made.
Please let me know if there are any other changes I can make to this PR to get it accepted.
Thanks,
Phil