Different signature for atomic_compare_exchange_n builtin function and libatomic implementation

semi1@posteo.de semi1@posteo.de
Sun Feb 10 21:37:00 GMT 2019

i have a question regarding the function signature of some atomic 
On https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html 
compare_exchange has the signature: "bool __atomic_compare_exchange_n 
(type *ptr, type *expected, type desired, bool weak, int 
success_memorder, int failure_memorder)"
On https://gcc.gnu.org/wiki/Atomic/GCCMM/LIbrary it has the signature 
"bool  __atomic_compare_exchange_N (IN *mem, IN *expected, IN desired, 
int success, int failure)"
When i try to use __atomic_compare_exchange_4 with 5 arguments i get 
following error: too few arguments to function 
How can can i call the library function?

Thanks for your help

More information about the Gcc-help mailing list