public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Liska <marxin@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-4715] gcov: annotate uncovered branches [PR107537]
Date: Thu, 15 Dec 2022 10:59:24 +0000 (GMT)	[thread overview]
Message-ID: <20221215105925.084E1384E7BC@sourceware.org> (raw)

https://gcc.gnu.org/g:c263c3eba8953c341cd8ac2d0a5f2b8f38623016

commit r13-4715-gc263c3eba8953c341cd8ac2d0a5f2b8f38623016
Author: Spacetown <michael.foerderer@gmx.de>
Date:   Sun Dec 4 21:03:34 2022 +0100

    gcov: annotate uncovered branches [PR107537]
    
            PR gcov-profile/107537
    
    gcc/ChangeLog:
            * gcov.cc (output_branch_count): Add annotation '(fallthrough)'
            or '(throw)' also to uncovered branches.
    
    Signed-off-by: Michael Förderer <michael.foerderer@gmx.de>

Diff:
---
 gcc/gcov.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/gcov.cc b/gcc/gcov.cc
index 9cf1071166f..fa1ef7613ad 100644
--- a/gcc/gcov.cc
+++ b/gcc/gcov.cc
@@ -2893,7 +2893,9 @@ output_branch_count (FILE *gcov_file, int ix, const arc_info *arc)
 		 arc->fall_through ? " (fallthrough)"
 		 : arc->is_throw ? " (throw)" : "");
       else
-	fnotice (gcov_file, "branch %2d never executed", ix);
+	fnotice (gcov_file, "branch %2d never executed%s", ix,
+		 (arc->fall_through ? " (fallthrough)"
+		  : arc->is_throw ? " (throw)" : ""));
 
       if (flag_verbose)
 	fnotice (gcov_file, " (BB %d)", arc->dst->id);

                 reply	other threads:[~2022-12-15 10:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221215105925.084E1384E7BC@sourceware.org \
    --to=marxin@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).