[Bug c++/60689] Bogus error with atomic::exchange
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Mar 27 20:21:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60689
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
when the object is bigger than the wordsize the generic __atomic_exchange gets
expanded incorrectly
$ g++11 aa.cc -DN=4 -m32
$ g++11 aa.cc -DN=5 -m32
aa.cc: In function ‘int main()’:
aa.cc:10:49: error: invalid conversion from ‘S*’ to ‘unsigned int’
[-fpermissive]
__atomic_exchange(&a, &b, &c, __ATOMIC_SEQ_CST);
^
aa.cc:10:49: error: invalid conversion from ‘int’ to ‘void*’ [-fpermissive]
aa.cc:10:49: error: too few arguments to function ‘void
__atomic_exchange(unsigned int, volatile void*, void*, void*, int)’
<built-in>: note: declared here
More information about the Gcc-bugs
mailing list