public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-6713] Suppress valid warning [PR104103].
@ 2022-01-19  1:04 Martin Sebor
  0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2022-01-19  1:04 UTC (permalink / raw)
  To: gcc-cvs

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" } } */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-19  1:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-19  1:04 [gcc r12-6713] Suppress valid warning [PR104103] Martin Sebor

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).