From: Jason Merrill <jason@redhat.com>
To: Richard Henderson <rth@redhat.com>
Cc: Torvald Riegel <triegel@redhat.com>,
GCC Patches <gcc-patches@gcc.gnu.org>,
Aldy Hernandez <aldyh@redhat.com>
Subject: Re: [trans-mem] Fix instantiation of transaction expressions.
Date: Mon, 07 Nov 2011 19:09:00 -0000 [thread overview]
Message-ID: <4EB82BD3.1030507@redhat.com> (raw)
In-Reply-To: <4EB807FF.3070300@redhat.com>
On 11/07/2011 11:31 AM, Richard Henderson wrote:
> On 11/07/2011 06:12 AM, Torvald Riegel wrote:
>> stmt = begin_transaction_stmt (input_location, NULL, flags);
>> tmp = RECUR (TRANSACTION_EXPR_BODY (t));
>> + if (tmp)
>> + {
>> + /* No statements; handle this like an expression. */
>
> In which case I'm pretty sure you ought to check for non-null
> TRANSACTION_EXPR_BODY first and not call begin_transaction_stmt.
I believe TRANSACTION_EXPR_BODY is always non-null, but when tsubst_expr
is called for a statement it adds the new statement via add_stmt and
returns null. This approach is a bit funny, but ought to work fine, and
there doesn't seem to be a simple test to distinguish between statements
and expressions currently.
Jason
next prev parent reply other threads:[~2011-11-07 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 14:24 Torvald Riegel
2011-11-07 16:41 ` Richard Henderson
2011-11-07 19:09 ` Jason Merrill [this message]
2011-11-07 19:47 ` Torvald Riegel
2011-11-07 20:28 ` 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=4EB82BD3.1030507@redhat.com \
--to=jason@redhat.com \
--cc=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=rth@redhat.com \
--cc=triegel@redhat.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).