Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-18 11:24:43


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 16 April 2008 22:22 pm, Mat Marcus wrote:
> 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)':

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

It looks like a real bug to me, from glancing at the header. It's modifying a
float variable through an integer pointer, which will break badly on gcc with
optimization turned on, unless -fno-strict-aliasing is used as Roland
suggested.

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFICL085vihyNWuA4URAtyyAJoD2d8S2BbUSXPct22/OA+WFmxNRQCeNa27
rD8TNziy1O020oofjE8pTfI=
=8jXe
-----END PGP SIGNATURE-----


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