https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65697

--- Comment #20 from Andrew Haley <aph at gcc dot gnu.org> ---
(In reply to mwahab from comment #19)
> (In reply to Andrew Haley from comment #18)
> 
> It looks inconsistent with C11 S7.17.7.4-2 (C++11 S29.6.4-21) "Further, if
> the comparison is true, memory is affected according to the value of
> success, and if the comparison is false, memory is affected according to the
> value of failure." (where success and failure are the memory model
> arguments.) In this case, the write to *exp should be memory_order_seq_cst.

But no store actually takes place, so the only effect is that of the read. You
can't have a sequentially consistent store without a store.

Reply via email to