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 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


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