[Bug c++/36254] wrong control reaches end of non-void function warning

2008-12-27 Thread pinskia at gcc dot gnu dot org
--- Comment #12 from pinskia at gcc dot gnu dot org 2008-12-28 03:30 --- t2.cpp is really PR 20681. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-10-27 Thread jakub at gcc dot gnu dot org
--- Comment #8 from jakub at gcc dot gnu dot org 2008-10-27 12:23 --- The problem is that during gimplification shortcut_cond_expr doesn't detect that then_ can't fallthru, if it detected that, then no jump around the else block would be added and control reaches end of non-void

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-10-27 Thread manu at gcc dot gnu dot org
--- Comment #9 from manu at gcc dot gnu dot org 2008-10-27 12:42 --- What is an IF_STMT? Is block_may_fallthru a middle-end function, then why it is seeing front-end tree codes? Is it not, then why each front-end does not have its own version (perhaps sharing some common part)?

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-10-27 Thread jakub at gcc dot gnu dot org
--- Comment #10 from jakub at gcc dot gnu dot org 2008-10-27 14:05 --- Language specific tree codes are allowed until the gimplification is done, the cp_gimplify_expr langhook takes care of either rewriting the lang specific tree code into GENERIC (COND_EXPR in this case), or tuplifying

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-10-27 Thread manu at gcc dot gnu dot org
--- Comment #11 from manu at gcc dot gnu dot org 2008-10-27 14:35 --- (In reply to comment #10) Language specific tree codes are allowed until the gimplification is done, the cp_gimplify_expr langhook takes care of either rewriting the lang specific tree code into GENERIC (COND_EXPR

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-10-22 Thread manu at gcc dot gnu dot org
--- Comment #7 from manu at gcc dot gnu dot org 2008-10-22 18:19 --- The return is generated because we generate one (if there is none) everytime we reach the end of a function. This is used later to produce control reaches end of non-void function. The compiler-generated try-catch

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-08-25 Thread manu at gcc dot gnu dot org
--- Comment #6 from manu at gcc dot gnu dot org 2008-08-25 11:16 --- We should not warn for compiler-generated code anyway. We need to find where this is generated and then we need to check before warning. -- manu at gcc dot gnu dot org changed: What|Removed

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-25 Thread pluto at agmk dot net
--- 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)

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net
--- Comment #1 from pluto at agmk dot net 2008-05-17 09:54 --- Created an attachment (id=15647) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15647action=view) testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net
--- Comment #2 from pluto at agmk dot net 2008-05-17 09:54 --- Created an attachment (id=15648) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15648action=view) testcase. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36254

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread pluto at agmk dot net
--- Comment #3 from pluto at agmk dot net 2008-05-17 11:13 --- 4.4.0-20080517 also fails. -- pluto at agmk dot net changed: What|Removed |Added Known to fail|4.1.2

[Bug c++/36254] wrong control reaches end of non-void function warning

2008-05-17 Thread rguenth at gcc dot gnu dot org
--- 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 :