Christian BRUEL <christian.bruel@xxxxxx> writes: > Can I assume from the gcc sources that the __sync_fetch_ builtins take > only unsigned value as inputs, and thus also return unsigned values. These builtins came from Intel. This page http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/cpp/lin/compiler_c/intref_cls/common/intref_itanium_synchro_prim.htm suggests but does not clearly state that the return type should be the same as the value type. We could probably implement that in gcc, but I think it would be awkward to simply change the sign of the return type now; it might break currently working programs. This is probably worth a bug report in any case. Ian