I tested it with clang 3.1 and it seems that clang is enforcing the use of the same type for all parameters in this builtin. Looking at the function declaration [1] bool __sync_bool_compare_and_swap (type *ptr, type oldval type newval, ...) it seems to be doing the right thing: here the same type is used for *ptr, oldval and newval. [1] http://gcc.gnu.org/onlinedocs/gcc/_005f_005fsync-Builtins.html#g_t_005f_005fsync-Builtins "