[trans-mem] fix C++ transaction_wrap attribute

Aldy Hernandez aldyh@redhat.com
Fri Oct 28 15:23:00 GMT 2011


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?
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: curr
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20111028/7b7e8254/attachment.ksh>


More information about the Gcc-patches mailing list