id summary reporter owner description type status milestone component version severity resolution keywords cc 9725 dynamic_bitset.hpp: implicit conversion changes signedness Thomas Klausner acharles "When compiling code against boost-1.55.0 (on NetBSD-6.99.33/amd64 with clang-3.5 trunk 201163, but reportedly also on OS X with clang) I get signedness warnings when using dynamic_bitset.hpp: In file included from /usr/pkg/include/boost/dynamic_bitset.hpp:15: /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:1697:14: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] + static_cast( num_bits % bits_per_block != 0 ); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:388:23: note: in instantiation of member function 'boost::dynamic_bitset >::calc_num_blocks' requested h\ ere m_bits.resize(calc_num_blocks(num_bits)); ^ /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:600:5: note: in instantiation of member function 'boost::dynamic_bitset >::init_from_unsigned_long' requ\ ested here init_from_unsigned_long(num_bits, value); ^ ../../../path/to/Table.cc:186:28: note: in instantiation of member function 'boost::dynamic_bitset >::dynamic_bitset' requested here Matches *matches = new Matches(get_num_rows()); ^ In file included from /usr/pkg/include/boost/dynamic_bitset.hpp:15: /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:1233:33: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] return i * bits_per_block + boost::lowest_bit(m_bits[i]); ~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:1242:12: note: in instantiation of member function 'boost::dynamic_bitset >::m_do_find_from' requested h\ ere return m_do_find_from(0); ^ ../../../path/to/some.xs:145:30: note: in instantiation of member function 'boost::dynamic_bitset >::find_first' requested here for (size_t j = matches->find_first(); j != nfotex_gtl::Matches::npos; j = matches->find_next(j)) { ^ In file included from /usr/pkg/include/boost/dynamic_bitset.hpp:15: /usr/pkg/include/boost/dynamic_bitset/dynamic_bitset.hpp:1264:32: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion] blk * bits_per_block + lowest_bit(fore) ~ ^~~~~~~~~~~~~~~~ ../../../path/to/some.xs:145:89: note: in instantiation of member function 'boost::dynamic_bitset >::find_next' requested here for (size_t j = matches->find_first(); j != nfotex_gtl::Matches::npos; j = matches->find_next(j)) { ^ I've checked the git repository, the corresponding lines are unchanged since then. Attached is a patch adding casts that fixes this. " Bugs closed Boost 1.56.0 dynamic_bitset Boost 1.55.0 Problem fixed