This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of NAD Editorial status.

864. Defect in atomic wording

Section: 33.5.8.2 [atomics.types.operations] Status: NAD Editorial Submitter: Anthony Williams Opened: 2008-07-10 Last modified: 2016-01-28

Priority: Not Prioritized

View all other issues in [atomics.types.operations].

View all issues with NAD Editorial status.

Discussion:

There's an error in 33.5.8.2 [atomics.types.operations]/p9:

C atomic_load(const volatile A * object);
C atomic_load_explicit(const volatile A * object, memory_order);
C A ::load(memory_order order = memory_order_seq_cst) const volatile;

Requires: The order argument shall not be memory_order_acquire nor memory_order_acq_rel.

I believe that this should state

shall not be memory_order_release.

There's also an error in 33.5.8.2 [atomics.types.operations]/p17:

... When only one memory_order argument is supplied, the value of success is order, and the value of failure is order except that a value of memory_order_acq_rel shall be replaced by the value memory_order_require ...

I believe this should state

shall be replaced by the value memory_order_acquire ...

Proposed resolution:

Change 33.5.8.2 [atomics.types.operations]/p9:

C atomic_load(const volatile A * object);
C atomic_load_explicit(const volatile A * object, memory_order);
C A ::load(memory_order order = memory_order_seq_cst) const volatile;

Requires: The order argument shall not be memory_order_acquire memory_order_release nor memory_order_acq_rel.

Change 33.5.8.2 [atomics.types.operations]/p17:

... When only one memory_order argument is supplied, the value of success is order, and the value of failure is order except that a value of memory_order_acq_rel shall be replaced by the value memory_order_require memory_order_acquire ...

Rationale:

Already fixed by the time the LWG processed it.