https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84137
Bug ID: 84137
Summary: Typo in gcov online documentation
Product: gcc
Version: 7.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: peter.klotz99 at gmail dot com
CC: marxin at gcc dot gnu.org
Target Milestone: ---
There is a typo on this page of the gcov online documentation:
https://gcc.gnu.org/onlinedocs/gcc/Invoking-Gcov.html
It states:
"Unexecuted lines are marked ‘#####’ or ‘====’, depending on whether..."
It should be "=====" (five consecutive equal signs instead of four).
This simple test program shows that 5 is correct:
----------------------
int main()
{
int i=0;
try {
if (i==4)
throw 7;
}
catch (...) {
i=5;
}
return 0;
}
----------------------
g++ -Wall -Wextra -g -fprofile-arcs -ftest-coverage coverage.cpp -o coverage
gcov coverage.gcda
----------------------
-: 0:Source:coverage.cpp
-: 0:Graph:coverage.gcno
-: 0:Data:coverage.gcda
-: 0:Runs:1
-: 0:Programs:1
1: 1:int main()
-: 2:{
1: 3: int i=0;
-: 4: try {
1: 5: if (i==4)
#####: 6: throw 7;
-: 7: }
=====: 8: catch (...) {
=====: 9: i=5;
-: 10: }
1: 11: return 0;
-: 12:}
----------------------