[Bug c++/20624] [4.0/4.1 Regression] wrong "control reaches end of non-void function" warning
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 17 22:35:00 GMT 2005
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 22:34 -------
I have a patch wich fixes this bug but not 20681:
Index: gimple-low.c
===============================================================
====
RCS file: /cvs/gcc/gcc/gcc/gimple-low.c,v
retrieving revision 2.26
diff -u -p -r2.26 gimple-low.c
--- gimple-low.c 30 Jun 2005 00:47:49 -0000 2.26
+++ gimple-low.c 17 Aug 2005 22:34:31 -0000
@@ -368,6 +368,9 @@ block_may_fallthru (tree block)
case CALL_EXPR:
/* Functions that do not return do not fall through. */
return (call_expr_flags (stmt) & ECF_NORETURN) == 0;
+
+ case CLEANUP_POINT_EXPR:
+ return block_may_fallthru (TREE_OPERAND (stmt, 0));
default:
return true;
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20624
More information about the Gcc-bugs
mailing list