public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/25973] [4.4/4.5/4.6/4.7 Regression] Wrong warning: control reaches end of non-void function Date: Tue, 22 Nov 2011 15:06:00 -0000 [thread overview] Message-ID: <bug-25973-4-px9hWq6Kaw@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-25973-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973 vries at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #11 from vries at gcc dot gnu.org 2011-11-22 14:51:37 UTC --- I can't reproduce the problem from the description with 4.7, but I can reproduce the problem from comment 4 with 4.7. Tentative patch for test-case from comment 4: ... Index: gcc/gimple-low.c =================================================================== --- gcc/gimple-low.c (revision 181172) +++ gcc/gimple-low.c (working copy) @@ -680,6 +680,12 @@ block_may_fallthru (const_tree block) case CLEANUP_POINT_EXPR: return block_may_fallthru (TREE_OPERAND (stmt, 0)); + case DO_STMT: + /* DO_STMT is part of cp-tree.def, so this should be moved to a + cp-specific file. */ + /* If DO_BODY doesn't fall thru, then DO_STMT doesn't either. */ + return block_may_fallthru (TREE_OPERAND (stmt, 1)); + default: return true; } ... Perhaps we should file a separate bug for the test-case from comment 4.
next prev parent reply other threads:[~2011-11-22 14:52 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-25973-4@http.gcc.gnu.org/bugzilla/> 2011-06-27 13:14 ` [Bug c++/25973] [4.3/4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org 2011-11-22 15:06 ` vries at gcc dot gnu.org [this message] 2012-01-21 5:26 ` [Bug c++/25973] [4.4/4.5/4.6/4.7 " paolo.carlini at oracle dot com 2012-01-21 12:29 ` vries at gcc dot gnu.org 2012-01-21 13:00 ` paolo.carlini at oracle dot com 2012-01-21 23:16 ` paolo.carlini at oracle dot com 2012-01-23 13:52 ` paolo.carlini at oracle dot com 2012-01-23 14:10 ` vries at gcc dot gnu.org 2012-03-13 14:03 ` [Bug c++/25973] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org 2012-04-24 8:54 ` vries at gcc dot gnu.org 2012-04-24 9:58 ` ssomers at opnet dot com 2012-04-24 10:31 ` redi 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-25973-4-px9hWq6Kaw@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: linkBe 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).