public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/36254] wrong "control reaches end of non-void function" warning
Date: Sat, 17 May 2008 12:56:00 -0000	[thread overview]
Message-ID: <20080517125606.27721.qmail@sourceware.org> (raw)
In-Reply-To: <bug-36254-7667@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from rguenth at gcc dot gnu dot org  2008-05-17 12:56 -------
Confirmed.  At -O0 we have after CFG building (t1.cpp)

  # BLOCK 8
  # PRED: 5 (fallthru) 6 (fallthru) 7 (fallthru)
<L6>:;
  __comp_dtor  (&x);
  switch (finally_tmp.3)
    {
      case 1: goto <L7>;
      default : goto <L8>;
    }
  # SUCC: 9 10

  # BLOCK 9
  # PRED: 8
<L7>:;
  return;
  # SUCC: EXIT


This would fix it.

Index: tree-eh.c
===================================================================
--- tree-eh.c   (revision 135433)
+++ tree-eh.c   (working copy)
@@ -1350,9 +1350,6 @@ decide_copy_try_finally (int ndests, tre
 {
   int f_estimate, sw_estimate;

-  if (!optimize)
-    return false;
-
   /* Finally estimate N times, plus N gotos.  */
   f_estimate = estimate_num_insns (finally, &eni_size_weights);
   f_estimate = (f_estimate + 1) * ndests;


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-05-17 12:56:06
               date|                            |


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


  parent reply	other threads:[~2008-05-17 12:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-17  9:54 [Bug c++/36254] New: " pluto at agmk dot net
2008-05-17  9:55 ` [Bug c++/36254] " pluto at agmk dot net
2008-05-17  9:55 ` pluto at agmk dot net
2008-05-17 11:14 ` pluto at agmk dot net
2008-05-17 12:56 ` rguenth at gcc dot gnu dot org [this message]
2008-05-25 19:21 ` pluto at agmk dot net
2008-08-25 11:17 ` manu at gcc dot gnu dot org
2008-10-22 18:21 ` manu at gcc dot gnu dot org
2008-10-27 12:24 ` jakub at gcc dot gnu dot org
2008-10-27 12:43 ` manu at gcc dot gnu dot org
2008-10-27 14:06 ` jakub at gcc dot gnu dot org
2008-10-27 14:36 ` manu at gcc dot gnu dot org
2008-12-28  3:32 ` pinskia at gcc dot gnu dot org
2008-12-28  3:36 ` [Bug c++/36254] [4.2/4.3/4.4 Regression] wrong "control reaches end of non-void function" warning with IF_STMT pinskia at gcc dot gnu dot org
2008-12-29 21:49 ` rguenth at gcc dot gnu dot org
2009-01-11 21:15 ` jakub at gcc dot gnu dot org
2009-01-11 21:33 ` [Bug c++/36254] [4.2/4.3 " jakub at gcc dot gnu dot org
2009-02-14 10:05 ` pinskia at gcc dot gnu dot org
2009-03-31 20:51 ` [Bug c++/36254] [4.3 " jsm28 at gcc dot gnu dot org
2009-08-04 12:40 ` rguenth at gcc dot gnu dot org
2010-05-22 18:24 ` rguenth at gcc dot gnu dot org
2010-09-02 16:23 ` pluto at agmk dot net

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=20080517125606.27721.qmail@sourceware.org \
    --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).