This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36254] wrong "control reaches end of non-void function" warning
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 May 2008 19:20:43 -0000
- Subject: [Bug c++/36254] wrong "control reaches end of non-void function" warning
- References: <bug-36254-7667@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pluto at agmk dot net 2008-05-25 19:20 -------
(In reply to comment #4)
> This would fix it.
4.3.1-20080525 with this patch seems to work fine.
>
> 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;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254