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]

Re: [PATCH] PR59448 - Promote consume to acquire


On 01/14/2015 01:28 PM, Joseph Myers wrote:
On Wed, 14 Jan 2015, Andrew MacLeod wrote:

- There is a warning for invalid memory models already, so I just continued
using that.
- I remove the check for CONSUME in exchange since the current standard makes
no mention of that being illegal.
- I also reversed the current check in compare_exchange to check for failure >
success first, allowing us to still catch both errors if present.

I think this brings us to where we ought to be...   at least almost :-)
The latest version I have  is n3337, which still specifies that atomic_clear
can't be memory_order_acquire or memory_order_acq_rel. Has that been updated
to specify that memory_order_consume is not allowed either?  I think there was
a request in at some point...   I can add that if so.

Bootstraps on x86_64-unknown-linux-gnu, and no regressions in the testsuite.

OK for trunk?
OK.

checked in after disallowing memory_order_consume on atomic_clear() and an additional test in the testcase for that...

Andrew


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