Boost logo

Boost :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-04-16 22:22:54


Hi,

In boost 1.35.0 I'm getting many of the following warnings from
gcc-4.2.0 under cygwin when using boost/functional/hash:

../boost_libraries/boost/functional/detail/hash_float.hpp: In function
'size_t boost::hash_detail::float_hash_impl(float)':
../boost_libraries/boost/functional/detail/hash_float.hpp:75: warning:
dereferencing type-punned pointer will break strict-aliasing rules
../boost_libraries/boost/functional/detail/hash_float.hpp: In function
'size_t boost::hash_detail::float_hash_impl(double)':
../boost_libraries/boost/functional/detail/hash_float.hpp:82: warning:
dereferencing type-punned pointer will break strict-aliasing rules
../boost_libraries/boost/functional/detail/hash_float.hpp: In function
'size_t boost::hash_detail::float_hash_impl(long double)':
../boost_libraries/boost/functional/detail/hash_float.hpp:90: warning:
dereferencing type-punned pointer will break strict-aliasing rules

Is this a boost bug, or a spurious warning? Is there a fix or a sound
workaround?

Thanks,
Mat


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk