This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __sync_fetch_ prototypes.


Christian BRUEL <christian.bruel@st.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]