Subject: [Boost-bugs] [Boost C++ Libraries] #10886: boost::hash_detail::hash_binary() Triggers GCC Strict Aliasing Warning
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-19 12:10:56
#10886: boost::hash_detail::hash_binary() Triggers GCC Strict Aliasing Warning
-------------------------------------------------+-------------------------
Reporter: Rob Stewart <rstewart@â¦> | Owner: danieljames
Type: Bugs | Status: new
Milestone: To Be Determined | Component: hash
Version: Boost 1.57.0 | Severity: Problem
Keywords: hash type-punning string-aliasing |
warning |
-------------------------------------------------+-------------------------
http://lists.boost.org/Archives/boost/2008/04/136209.php discusses the
issue and provides a fix, but the problem persists in develop. This fix
is long overdue.
The problem is that `boost::hash_detail::hash_binary()` casts its `char *`
parameter to `std::size_t *` when called by
`boost::hash_detail::float_hash_impl()`, which casts its `float` parameter
to `char *` to pass as `boost::hash_detail::hash_binary()`'s `char *`
argument, when called by `boost::hash_detail::float_hash_value()`.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/10886> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:17 UTC