From: Richard Henderson <rth@redhat.com>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: Richard Guenther <richard.guenther@gmail.com>, gcc-patches@gcc.gnu.org
Subject: Re: [Patch] Fix bogus 'function does return' warning
Date: Sun, 18 Oct 2009 16:36:00 -0000 [thread overview]
Message-ID: <4ADB38CF.20702@redhat.com> (raw)
In-Reply-To: <200910181703.15499.ebotcazou@adacore.com>
On 10/18/2009 08:03 AM, Eric Botcazou wrote:
> ... It also attempts to remove only
> unreachable return statements, that's sufficient and probably safer.
If you want to prevent EH from adding unnecessary edges, you also need
to remove gotos; removing just the returns is not sufficient.
> case GIMPLE_TRY:
> - lower_sequence (gimple_try_eval (stmt), data);
> - lower_sequence (gimple_try_cleanup (stmt), data);
> - break;
> + {
> + bool try_cannot_fallthru;
> + lower_sequence (gimple_try_eval (stmt), data);
> + try_cannot_fallthru = data->cannot_fallthru;
> + data->cannot_fallthru = false;
> + lower_sequence (gimple_try_cleanup (stmt), data);
> + /* See gimple_stmt_may_fallthru for the rationale. */
> + if (gimple_try_kind (stmt) == GIMPLE_TRY_FINALLY)
> + data->cannot_fallthru |= try_cannot_fallthru;
> + else
> + data->cannot_fallthru = false;
This last line is not correct. It should read
data->cannot_fallthru = try_cannot_fallthru;
r~
next prev parent reply other threads:[~2009-10-18 15:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 19:51 Eric Botcazou
2009-10-16 9:50 ` Richard Guenther
2009-10-16 9:55 ` Eric Botcazou
2009-10-16 10:38 ` Richard Guenther
2009-10-16 11:12 ` Eric Botcazou
2009-10-16 11:32 ` Richard Guenther
2009-10-16 13:21 ` Eric Botcazou
2009-10-17 10:26 ` Eric Botcazou
2009-10-17 11:29 ` Richard Guenther
2009-10-17 11:36 ` Eric Botcazou
2009-10-17 14:12 ` Richard Guenther
2009-10-17 17:00 ` Richard Henderson
2009-10-17 17:10 ` Richard Guenther
2009-10-18 15:49 ` Eric Botcazou
2009-10-18 16:36 ` Richard Henderson [this message]
2009-10-18 18:41 ` Eric Botcazou
2009-10-19 15:39 ` Richard Henderson
2009-10-19 17:32 ` Eric Botcazou
2009-10-19 18:30 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4ADB38CF.20702@redhat.com \
--to=rth@redhat.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).