<div class="gmail_quote">On Fri, Apr 13, 2012 at 2:53 AM, Sebastian Redl <span dir="ltr"><<a href="mailto:sebastian.redl@getdesigned.at" target="_blank">sebastian.redl@getdesigned.at</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On 13.04.2012 02:45, Richard Smith wrote:<br>
> Author: rsmith<br>
> Date: Thu Apr 12 19:45:38 2012<br>
> New Revision: 154640<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=154640&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=154640&view=rev</a><br>
> Log:<br>
> Implement the missing pieces needed to support libstdc++4.7's<atomic>:<br>
> __atomic_test_and_set, __atomic_clear, plus a pile of undocumented __GCC_*<br>
> predefined macros.<br>
><br>
> Implement library fallback for __atomic_is_lock_free and<br>
> __c11_atomic_is_lock_free, and implement __atomic_always_lock_free.<br>
><br>
> Contrary to their documentation, GCC's __atomic_fetch_add family don't<br>
> multiply the operand by sizeof(T) when operating on a pointer type.<br>
> libstdc++ relies on this quirk. Remove this handling for all but the<br>
> __c11_atomic_fetch_add and __c11_atomic_fetch_sub builtins.<br>
><br>
</div>This is scary. Do we have any idea how to handle it if GCC 4.8 fixes<br>
this? They can, since they just fix libstdc++ at the same time, but it<br>
will be a problem for us.</blockquote><div><br></div><div>I don't have a good answer for this (suggestions welcome!). I've pinged someone on the gcc side to find if this is intentional or a bug, but haven't heard back yet.</div>
</div>