This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[trans-mem] fix C++ transaction_wrap attribute
- From: Aldy Hernandez <aldyh at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>, Torvald Riegel <triegel at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 28 Oct 2011 09:50:50 -0500
- Subject: [trans-mem] fix C++ transaction_wrap attribute
The C++ front-end gives us a DECL for transaction_wrap attribute's
argument. The C front-end OTOH gives us an IDENTIFIER_NODE. I have no
idea why this change after the merge, but I have fixed the attribute
handler to work with both front-ends.
Also, for this case, distilled from testsuite/c-c++-common/tm/wrap-2.c,
the C++ FE correctly complains that "f4" was not declared in this scope.
The C front-end does not.
void g4(void) __attribute__((transaction_wrap(f4)))
Suffice to say that both front-ends are sufficiently different that we
should probably have two versions of testsuite/c-c++-common/tm/wrap-2.c.
The following patch fixes the attribute handler to work with both
front-ends and separates wrap-2.c into C and C++ versions. With it, the
wrap-* failures are fixed for C++.
Including the patches I have queued on my end, we are now down to 3
distinct C++ TM failures.
OK for branch?
Attachment:
curr
Description: Text document