[zeromq-dev] Casting bug in atomic_counter.hpp - probably only on non x86 or ARM CPUs.

Steven McCoy steven.mccoy at miru.hk
Tue Jun 2 14:07:31 CEST 2015

On 2 June 2015 at 07:51, Dr. David Kirkby (Kirkby Microwave Ltd) <
drkirkby at kirkbymicrowave.co.uk> wrote:

> atomic_counter.hpp:87:71: error: invalid conversion from 'volatile
> integer_t* {aka volatile unsigned int*}' to 'uint32_t* {aka unsigned
> int*}' [-fpermissive]
> This is line 87 which the error refers to.
> integer_t new_value = atomic_add_32_nv (&value, increment_);

This is correct for Oracle Studio,

This looks like a defective GCC, I don't think Oracle GCC 3 has these

You can try using the GCC intrinsics in preference for this particular
compiler version.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20150602/1daa3f96/attachment.htm>

More information about the zeromq-dev mailing list