public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Martin Sebor <msebor@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-6713] Suppress valid warning [PR104103].
Date: Wed, 19 Jan 2022 01:04:25 +0000 (GMT)	[thread overview]
Message-ID: <20220119010425.0259D385780E@sourceware.org> (raw)

https://gcc.gnu.org/g:282110ae8b54250c8dcb73afc6f30761a41e38e6

commit r12-6713-g282110ae8b54250c8dcb73afc6f30761a41e38e6
Author: Martin Sebor <msebor@redhat.com>
Date:   Tue Jan 18 17:53:20 2022 -0700

    Suppress valid warning [PR104103].
    
    gcc/testsuite/ChangeLog:
            PR middle-end/104103
            * gcc.dg/torture/pr57147-2.c: Prune out expected warning.

Diff:
---
 gcc/testsuite/gcc.dg/torture/pr57147-2.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-2.c b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
index 036a6d028e6..9952e3b8b95 100644
--- a/gcc/testsuite/gcc.dg/torture/pr57147-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
@@ -17,7 +17,13 @@ static void SetNaClSwitchExpectations (void)
 void TestSyscall(void)
 {
   SetNaClSwitchExpectations();
+
   _setjmp (g_return_jmp_buf);
 }
 
+/* sizeof g_return_jmp_buf is zero size but it's being passed to
+   a function declared to take an array of one element which might
+   trigger a warning.  Prune it out:
+   { dg-prune-output "-Wstringop-overflow" } */
+
 /* { dg-final { scan-tree-dump-not "setjmp" "optimized" } } */


                 reply	other threads:[~2022-01-19  1:04 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=20220119010425.0259D385780E@sourceware.org \
    --to=msebor@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).