public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107310] [12 Regression] "warning: control reaches end of non-void function" with a throw under a trivially-true conditional since r12-5638-ga3e75c1491cd2d50
Date: Tue, 18 Apr 2023 20:45:40 +0000	[thread overview]
Message-ID: <bug-107310-4-IiVKrSFilh@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107310-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107310

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:0f6d443f0d0dd8a6bab99ab1957df3cd82541b27

commit r12-9432-g0f6d443f0d0dd8a6bab99ab1957df3cd82541b27
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Mar 14 12:20:51 2023 -0400

    c++: -Wreturn-type with if (true) throw [PR107310]

    I removed this folding in GCC 12 because it was interfering with an
    experiment of richi's, but that never went in and the change causes
    regressions, so let's put it back.

    This reverts commit r12-5638-ga3e75c1491cd2d.

            PR c++/107310

    gcc/cp/ChangeLog:

            * cp-gimplify.cc (genericize_if_stmt): Restore folding
            of constant conditions.

    gcc/testsuite/ChangeLog:

            * c-c++-common/Wimplicit-fallthrough-39.c: Adjust warning.
            * g++.dg/warn/Wreturn-6.C: New test.

  parent reply	other threads:[~2023-04-18 20:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 20:23 [Bug c++/107310] New: "warning: control reaches end of non-void function" with a throw under a trivially-true conditional lvoege at gmail dot com
2022-10-19  0:38 ` [Bug c++/107310] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-10-19  0:39 ` pinskia at gcc dot gnu.org
2022-10-19  6:53 ` [Bug c++/107310] [12/13 Regression] "warning: control reaches end of non-void function" with a throw under a trivially-true conditional since r12-5638-ga3e75c1491cd2d50 marxin at gcc dot gnu.org
2022-10-19  7:23 ` rguenth at gcc dot gnu.org
2022-11-16 16:35 ` jakub at gcc dot gnu.org
2023-03-14 16:16 ` jason at gcc dot gnu.org
2023-03-14 18:46 ` cvs-commit at gcc dot gnu.org
2023-03-14 18:50 ` [Bug c++/107310] [12 " jason at gcc dot gnu.org
2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org [this message]
2023-04-18 20:48 ` jason at gcc dot gnu.org

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=bug-107310-4-IiVKrSFilh@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).