This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[trans-mem] Fix instantiation of transaction expressions.


I stumbled upon this when working on noexcept. When txn expressions were
processed in tsubst_expr(), the previous code incorrectly created empty
transaction statements because no statements got added to the statement
list used by (begin|finish)_transaction_stmt(). Also,
"return __transaction_atomic (x+1);" incorrectly returned an error that
this wouldn't return a value.
With the patch, if RECUR(...) returns a value, then we assume that this
is an expression and create a txn expression instead.

No regressions for the TM tests, running a bootstrap currently.

OK for branch?

Attachment: patch3
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]