<div class="gmail_quote">On Thu, Apr 19, 2012 at 11:29 AM, Matthias Vallentin <span dir="ltr"><<a href="mailto:vallentin@icir.org">vallentin@icir.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am having trouble with <atomic> and Clang SVN (Mac OSX Lion). Here is<br>
the test program:<br>
<br>
    #include <atomic><br>
<br>
    int main()<br>
    {<br>
        std::atomic_size_t a(0ul);<br>
        ++a;<br>
        --a;<br>
<br>
        return 0;<br>
    }<br>
<br>
This generates the following error:<br>
<br>
    In file included from test.cc:1:<br>
    /usr/include/c++/v1/atomic:1352:51: error: too few arguments to<br>
function call, expected 4, have 3<br>
            {return __atomic_exchange(&__a_, true, __m);}<br>
                    ~~~~~~~~~~~~~~~~~                 ^<br>
    /usr/include/c++/v1/atomic:1355:51: error: too few arguments to<br>
function call, expected 4, have 3<br>
            {return __atomic_exchange(&__a_, true, __m);}<br>
                    ~~~~~~~~~~~~~~~~~                 ^<br>
<br>
>From the C++11 status page [1], I see that atomic operations (N2427) are<br>
already supported in the SVN repository, but strong compare and exchange<br>
(N2748) not yet. Is the above error message occurring due to the lacking<br>
support for N2748?</blockquote><div><br></div><div>No, it results from your libc++ not being new enough.</div><div><br></div><div>We do not claim that strong compare-exchange is listed as supported because the strong/weak distinction is not available in LLVM IR (we always generate a strong compare-exchange). Maybe we should just mark it as done to avoid confusion.</div>
</div>