public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/54046] [4.6/4.7 Regression] wrong control reaches end of non-void function for switch case with throw and default
Date: Fri, 01 Feb 2013 14:03:00 -0000	[thread overview]
Message-ID: <bug-54046-4-ubqqtafzZP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-54046-4@http.gcc.gnu.org/bugzilla/>


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54046

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-01 14:02:41 UTC ---
Author: jakub
Date: Fri Feb  1 14:02:33 2013
New Revision: 195651

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195651
Log:
    Backported from mainline
    2012-11-23  Jakub Jelinek  <jakub@redhat.com>

    PR c++/54046
    * Makefile.in (gimple-low.o): Depend on langhooks.h.
    * gimple-low.c: Include langhooks.c.
    (block_may_fallthru): Handle TARGET_EXPR and ERROR_MARK,
    by default call lang_hooks.block_may_fallthru.
    * langhooks.h (struct lang_hooks): Add block_may_fallthru
    langhook.
    * langhooks-def.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Define.
    (LANG_HOOKS_INITIALIZER): Use it.

    * cp-objcp-common.h (LANG_HOOKS_BLOCK_MAY_FALLTHRU): Redefine.
    * cp-objcp-common.c (cxx_block_may_fallthru): New function.
    * cp-tree.h (cxx_block_may_fallthru): New prototype.

    * g++.dg/warn/Wreturn-type-8.C: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/Makefile.in
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/cp-objcp-common.c
    branches/gcc-4_7-branch/gcc/cp/cp-objcp-common.h
    branches/gcc-4_7-branch/gcc/cp/cp-tree.h
    branches/gcc-4_7-branch/gcc/gimple-low.c
    branches/gcc-4_7-branch/gcc/langhooks-def.h
    branches/gcc-4_7-branch/gcc/langhooks.h
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


  parent reply	other threads:[~2013-02-01 14:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 11:49 [Bug c++/54046] New: " plasmahh at gmx dot net
2012-07-20 12:10 ` [Bug c++/54046] " redi at gcc dot gnu.org
2012-07-20 12:15 ` [Bug c++/54046] [4.6/4.7/4.8 Regression] " redi at gcc dot gnu.org
2012-07-20 12:40 ` jakub at gcc dot gnu.org
2012-07-20 12:58 ` jakub at gcc dot gnu.org
2012-07-20 15:15 ` ebotcazou at gcc dot gnu.org
2012-09-07 10:03 ` rguenth at gcc dot gnu.org
2012-11-20 16:03 ` jakub at gcc dot gnu.org
2012-11-20 17:27 ` jakub at gcc dot gnu.org
2012-11-23 16:04 ` jakub at gcc dot gnu.org
2013-02-01 14:03 ` jakub at gcc dot gnu.org [this message]
2013-02-01 14:26 ` [Bug c++/54046] [4.6/4.7 " jakub 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-54046-4-ubqqtafzZP@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).