This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __sync_fetch_ prototypes.
- From: Ian Lance Taylor <iant at google dot com>
- To: Christian BRUEL <christian dot bruel at st dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 08 Oct 2009 16:52:03 -0700
- Subject: Re: __sync_fetch_ prototypes.
- References: <4ACE0B57.4030405@st.com>
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