
28 Feb
2014
28 Feb
'14
5:35 p.m.
Andrey Semashev wrote:
On Fri, Feb 28, 2014 at 8:00 PM, Peter Dimov
wrote: Does anyone know what is the earlier version of Clang that supports the __sync_* intrinsics?
I don't know what was the earliest one but you could use __has_builtin macro to check for its presence.
Yes, I figured that out slightly after I sent the mail. Version checks are not the Clang way and are a symptom of an outdated mentality. :-)
You can also use __GCC_HAVE_SYNC_COMPARE_AND_SWAP_N macros...
Interestingly, it turns out that I already do that. The problem prompting https://svn.boost.org/trac/boost/ticket/9315 is probably that an earlier #ifdef path is taken instead.