[Boost-bugs] [Boost C++ Libraries] #1095: GCC warnings with -Wsign-promo

Subject: [Boost-bugs] [Boost C++ Libraries] #1095: GCC warnings with -Wsign-promo
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-07-17 13:44:34

#1095: GCC warnings with -Wsign-promo
 Reporter: joaquin | Owner: danieljames
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: hash
  Version: release 1.34.0 | Severity: Cosmetic
 Keywords: |
 The mere inclusion of <boost/functional/hash.hpp> produces warnings
 in GCC for Boost 1.34 when -Wsign-promo is set:

 In file included from /.../boost/functional/hash.hpp:10,
  from ...
 /.../boost/functional/hash/hash.hpp: In member function
  `size_t boost::hash<bool>::operator()(bool) const':
 /.../boost/functional/hash/hash.hpp:353: warning: passing
  `bool' chooses `int' over `long unsigned int'

 In Boost 1.33.1, the warnings only appear when hash<bool>,
 hash<ungisned char>, hash<wchar_t> or hash<short unsigned int>
 are instantiated --the difference between that 1.33.1 and
 1.34 is that the latter automatically instantiates a number
 of specialization for integral types, among them the offending

 Although the warnings seem unharmful, it'd be great if they can
 be silenced by providing overloads of hash_value for all C++
 integral types, so that no integral promotions occur.

Ticket URL: <http://svn.boost.org/trac/boost/ticket/1095>
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:49:56 UTC