]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcov: improve --coverage small example
authorMartin Liska <mliska@suse.cz>
Tue, 9 Jun 2020 11:14:57 +0000 (13:14 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 9 Jun 2020 11:16:09 +0000 (13:16 +0200)
Pushed to master.

gcc/ChangeLog:

PR gcov-profile/95365
* doc/gcov.texi: Compile and link one example in 2 steps.

gcc/doc/gcov.texi

index 61250c9407e1d0e49a693d0fcc4e4c38d0e6afff..22e42da2ea66db568e6c563c4f2e619fe2c9ae92 100644 (file)
@@ -528,7 +528,8 @@ for each line.  For example, if your program is called @file{tmp.cpp}, this
 is what you see when you use the basic @command{gcov} facility:
 
 @smallexample
-$ g++ --coverage tmp.cpp
+$ g++ --coverage tmp.cpp -c
+$ g++ --coverage tmp.o
 $ a.out
 $ gcov tmp.cpp -m
 File 'tmp.cpp'