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:} ----------------------
Thanks for the report, I'll fix it soon.
Author: marxin Date: Mon Feb 5 09:59:16 2018 New Revision: 257384 URL: https://gcc.gnu.org/viewcvs?rev=257384&root=gcc&view=rev Log: Fix GCOV documentation (PR gcov-profile/84137). 2018-02-05 Martin Liska <mliska@suse.cz> PR gcov-profile/84137 * doc/gcov.texi: Fix typo in documentation. Modified: trunk/gcc/ChangeLog trunk/gcc/doc/gcov.texi
Fixed on trunk, queued for backports.
Author: marxin Date: Tue Mar 6 20:06:56 2018 New Revision: 258297 URL: https://gcc.gnu.org/viewcvs?rev=258297&root=gcc&view=rev Log: Backport r257384 2018-03-06 Martin Liska <mliska@suse.cz> Backport from mainline 2018-02-05 Martin Liska <mliska@suse.cz> PR gcov-profile/84137 * doc/gcov.texi: Fix typo in documentation. Modified: branches/gcc-7-branch/gcc/ChangeLog branches/gcc-7-branch/gcc/doc/gcov.texi
Author: marxin Date: Wed Mar 7 09:48:44 2018 New Revision: 258330 URL: https://gcc.gnu.org/viewcvs?rev=258330&root=gcc&view=rev Log: Backport r257384 2018-03-07 Martin Liska <mliska@suse.cz> Backport from mainline 2018-02-05 Martin Liska <mliska@suse.cz> PR gcov-profile/84137 * doc/gcov.texi: Fix typo in documentation. Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/doc/gcov.texi
Should be fixed on all active branches.