aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-low.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2005-02-09 21:40:00 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2005-02-09 21:40:00 +0000
commit5eefcf2f003dc46fc4c8a115c23a53b60e3a2952 (patch)
tree1cfa53065918b3c69e7ee64ec9afd266b459f879 /gcc/gimple-low.c
parent328d1d4c1c902bfa35bfdb69d7b22afca3a68e14 (diff)
downloadgcc-5eefcf2f003dc46fc4c8a115c23a53b60e3a2952.zip
gcc-5eefcf2f003dc46fc4c8a115c23a53b60e3a2952.tar.gz
gcc-5eefcf2f003dc46fc4c8a115c23a53b60e3a2952.tar.bz2
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
Diffstat (limited to 'gcc/gimple-low.c')
-rw-r--r--gcc/gimple-low.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/gcc/gimple-low.c b/gcc/gimple-low.c
index 6e60aeb..f3e70ee 100644
--- a/gcc/gimple-low.c
+++ b/gcc/gimple-low.c
@@ -291,15 +291,16 @@ try_catch_may_fallthru (tree stmt)
return false;
case EH_FILTER_EXPR:
- /* If the exception does not match EH_FILTER_TYPES, we will
- execute EH_FILTER_FAILURE, and we will fall through if that
- falls through. If the exception does match EH_FILTER_TYPES,
- we will fall through. We don't know which exceptions may be
- generated, so we just check for EH_FILTER_TYPES being NULL,
- in which case we know that that the exception does not
- match. */
- return (EH_FILTER_TYPES (tsi_stmt (i)) != NULL
- || block_may_fallthru (EH_FILTER_FAILURE (tsi_stmt (i))));
+ /* The exception filter expression only matters if there is an
+ exception. If the exception does not match EH_FILTER_TYPES,
+ we will execute EH_FILTER_FAILURE, and we will fall through
+ if that falls through. If the exception does match
+ EH_FILTER_TYPES, the stack unwinder will continue up the
+ stack, so we will not fall through. We don't know whether we
+ will throw an exception which matches EH_FILTER_TYPES or not,
+ so we just ignore EH_FILTER_TYPES and assume that we might
+ throw an exception which doesn't match. */
+ return block_may_fallthru (EH_FILTER_FAILURE (tsi_stmt (i)));
default:
/* This case represents statements to be executed when an