Commit 5eefcf2f by Ian Lance Taylor Committed by Ian Lance Taylor

re PR middle-end/19583 (Incorrect diagnostic: control may reach end of non-void…

re PR middle-end/19583 (Incorrect diagnostic: control may reach end of non-void function '...' being inlined)

	PR middle-end/19583
	* gimple-low.c (try_catch_may_fallthru): In EH_FILTER_EXPR case,
	just check whether EH_FILTER_FAILURE falls through.

From-SVN: r94777
parent 328d1d4c
2005-02-09 Ian Lance Taylor <ian@airs.com>
PR middle-end/19583
* gimple-low.c (try_catch_may_fallthru): In EH_FILTER_EXPR case,
just check whether EH_FILTER_FAILURE falls through.
2005-02-09 Andreas Krebbel <krebbel1@de.ibm.com> 2005-02-09 Andreas Krebbel <krebbel1@de.ibm.com>
* gcc/haifa-sched.c (schedule_block): Make queued sched group * gcc/haifa-sched.c (schedule_block): Make queued sched group
......
...@@ -291,15 +291,16 @@ try_catch_may_fallthru (tree stmt) ...@@ -291,15 +291,16 @@ try_catch_may_fallthru (tree stmt)
return false; return false;
case EH_FILTER_EXPR: case EH_FILTER_EXPR:
/* If the exception does not match EH_FILTER_TYPES, we will /* The exception filter expression only matters if there is an
execute EH_FILTER_FAILURE, and we will fall through if that exception. If the exception does not match EH_FILTER_TYPES,
falls through. If the exception does match EH_FILTER_TYPES, we will execute EH_FILTER_FAILURE, and we will fall through
we will fall through. We don't know which exceptions may be if that falls through. If the exception does match
generated, so we just check for EH_FILTER_TYPES being NULL, EH_FILTER_TYPES, the stack unwinder will continue up the
in which case we know that that the exception does not stack, so we will not fall through. We don't know whether we
match. */ will throw an exception which matches EH_FILTER_TYPES or not,
return (EH_FILTER_TYPES (tsi_stmt (i)) != NULL so we just ignore EH_FILTER_TYPES and assume that we might
|| block_may_fallthru (EH_FILTER_FAILURE (tsi_stmt (i)))); throw an exception which doesn't match. */
return block_may_fallthru (EH_FILTER_FAILURE (tsi_stmt (i)));
default: default:
/* This case represents statements to be executed when an /* This case represents statements to be executed when an
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment