Boost logo

Boost :

Subject: Re: [boost] clang support for __sync_* intrinsics
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2014-02-28 11:49:22


On Fri, Feb 28, 2014 at 8:00 PM, Peter Dimov <lists_at_[hidden]> 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. You can also use
__GCC_HAVE_SYNC_COMPARE_AND_SWAP_N macros (where N is the size of the
arguments) which are defined when __sync_compare_and_swap is supported
in hardware.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk