aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2019-03-06 11:01:16 +0100
committerMartin Liska <marxin@gcc.gnu.org>2019-03-06 10:01:16 +0000
commitbb7c147fc8197a85a29f7d2d6e0f78331800edec (patch)
tree5dd863784c9c359b0050fbc406dedca5680299bf
parent08bc73f09c02a49e125c5e851456ac5b13ac3560 (diff)
downloadgcc-bb7c147fc8197a85a29f7d2d6e0f78331800edec.zip
gcc-bb7c147fc8197a85a29f7d2d6e0f78331800edec.tar.gz
gcc-bb7c147fc8197a85a29f7d2d6e0f78331800edec.tar.bz2
Use --coverage instead of -fprofile-arcs -ftest-coverage in documentation (PR gcov-profile/89577).
2019-03-06 Martin Liska <mliska@suse.cz> PR gcov-profile/89577 * doc/gcov.texi: Prefer to use --coverage. * doc/sourcebuild.texi: Likewise. From-SVN: r269415
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/gcov.texi10
-rw-r--r--gcc/doc/sourcebuild.texi2
3 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index df50f59..2603a77 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2019-03-06 Martin Liska <mliska@suse.cz>
+
+ PR gcov-profile/89577
+ * doc/gcov.texi: Prefer to use --coverage.
+ * doc/sourcebuild.texi: Likewise.
+
2019-03-02 Jason Merrill <jason@redhat.com>
PR c++/86485 - -Wmaybe-unused with empty class ?:
diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi
index a128f5f..eaac2f6 100644
--- a/gcc/doc/gcov.texi
+++ b/gcc/doc/gcov.texi
@@ -486,8 +486,8 @@ are @emph{exactly} 0% and 100% respectively. Other values which would
conventionally be rounded to 0% or 100% are instead printed as the
nearest non-boundary value.
-When using @command{gcov}, you must first compile your program with two
-special GCC options: @samp{-fprofile-arcs -ftest-coverage}.
+When using @command{gcov}, you must first compile your program
+with a special GCC option @samp{--coverage}.
This tells the compiler to generate additional information needed by
gcov (basically a flow graph of the program) and also includes
additional code in the object files for generating the extra profiling
@@ -504,7 +504,7 @@ 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++ -fprofile-arcs -ftest-coverage tmp.cpp
+$ g++ --coverage tmp.cpp
$ a.out
$ gcov tmp.cpp -m
File 'tmp.cpp'
@@ -802,8 +802,8 @@ new execution counts and finally writes the data to the file.
@section Using @command{gcov} with GCC Optimization
If you plan to use @command{gcov} to help optimize your code, you must
-first compile your program with two special GCC options:
-@samp{-fprofile-arcs -ftest-coverage}. Aside from that, you can use any
+first compile your program with a special GCC option
+@samp{--coverage}. Aside from that, you can use any
other GCC options; but if you want to prove that every single line
in your program was executed, you should not compile with optimization
at the same time. On some machines the optimizer can eliminate some
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index a670456..cf12d74 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2967,7 +2967,7 @@ in @file{lib/gcc-dg.exp} to compile and run the test program. A typical
@command{gcov} test contains the following DejaGnu commands within comments:
@smallexample
-@{ dg-options "-fprofile-arcs -ftest-coverage" @}
+@{ dg-options "--coverage" @}
@{ dg-do run @{ target native @} @}
@{ dg-final @{ run-gcov sourcefile @} @}
@end smallexample