__sync_val_compare_and_swap and floats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

what is the recommended way to call __sync_val_compare_and_swap for a float 
pointer? 

On the platforms where the code should run a float is 4 bytes. Therefore we 
casted to an int pointer which is also 4 bytes. However this gives us a 
warning:

warning: dereferencing type-punned pointer will break strict-aliasing rules

How to do this correctly?

Christoph

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux