Bug 69115

Summary: transactional memory attributes are missing docs and inconsistent with spec
Product: gcc Reporter: sandra
Component: libitmAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: msebor
Priority: P3 Keywords: documentation
Version: 6.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2016-08-01 00:00:00

Description sandra 2016-01-02 03:28:11 UTC
I found this issue while checking for undocumented attributes in connection with PR 1078.

These attributes defined in c-family/c-common.c have no documentation in extend.texi:

transaction_callable
transaction_may_cancel_outer
transaction_pure
transaction_safe
transaction_safe_dynamic
transaction_unsafe
transaction_wrap

I was thinking it would be OK to just list them in the manual and point at the specification found here for details:

https://sites.google.com/site/tmforcplusplus/

but....

transaction_pure, transaction_safe_dynamic, and transaction_wrap are not documented in the spec.

In trying to sort out which of these are function attributes and which are type attributes, I also found:

The spec says transaction_safe, transaction_unsafe, and transaction_callable can be used on classes, but the implementation only checks for transaction_safe and transaction_callable.

The spec says transaction_callable can only apply to a function definition/declaration and can't be associated with a pointer-to-function, but it doesn't look like the implementation imposes that restriction.

I think it would be helpful if someone familiar with the code could clarify if these differences are intentional and useful, and draft the missing documentation.
Comment 1 Andrew Pinski 2016-08-01 02:48:43 UTC
Confirmed.