On 19/01/15 16:02 +0000, Jonathan Wakely wrote:
We declare atomic_init() but then never define it, I assume that's
just an accident.

Although the standard says this function is non-atomic, the simplest
fix at this stage is just to do an atomic store (when we get to stage
1 again I'd like to make the function a friend of std::__atomic_base<>
so it can set the private member variable directly as a simple
non-atomic assignment).

Tested x86_64-linux, *not* committed to trunk.

Now committed to trunk.

commit 061dd1a073ef4646727a3f29dfa3169a760757b3
Author: Jonathan Wakely <jwak...@redhat.com>
Date:   Sun Jan 18 17:40:17 2015 +0000

        PR libstdc++/64658
        * include/std/atomic (atomic_init): Define.
        * testsuite/29_atomics/atomic/64658.cc: New.

Reply via email to