public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Biener <rguenth@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r8-10854] testsuite/100176 - fix struct-layout-1_generate.c compile
Date: Wed, 21 Apr 2021 10:54:23 +0000 (GMT)	[thread overview]
Message-ID: <20210421105423.187793AAB030@sourceware.org> (raw)

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

commit r8-10854-ge4053fb7beb551794cfba43c7a9623c43eb3e808
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Apr 21 12:46:51 2021 +0200

    testsuite/100176 - fix struct-layout-1_generate.c compile
    
    With -Werror=return-type we run into compile fails complaining about
    missing return stmts.
    
    2021-04-21  Richard Biener  <rguenther@suse.de>
    
            PR testsuite/100176
            * g++.dg/compat/struct-layout-1_generate.c: Add missing return.
            * gcc.dg/compat/struct-layout-1_generate.c: Likewise.
    
    (cherry picked from commit d8f953819e8f72e646f22c7803d79bd2b56d1e30)

Diff:
---
 gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c | 2 ++
 gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
index 8b620e46da8..db4c85b6661 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
@@ -968,6 +968,8 @@ subvalues (struct entry *e, char *p, char *letter)
       if (e[0].len != 0)
 	output_FNB ('B', e);
       return 1;
+    default:
+      return 0;
     }
 }
 
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index 75e902cd1f4..35dff89c377 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -1280,6 +1280,8 @@ subvalues (struct entry *e, char *p, char *letter)
       if (e[0].len != 0)
 	output_FNB ('B', e);
       return 1;
+    default:
+      return 0;
     }
 }


                 reply	other threads:[~2021-04-21 10:54 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=20210421105423.187793AAB030@sourceware.org \
    --to=rguenth@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).