Warnings in hash_table_impl.hpp with GCC 4.4.x
Greetings I'm trying to compile our code in an environment where we treat warnings as errors. This worked fine when we used GCC 4.1.2 which is fairly forgiving when compared to newer versions. However, after upgrading to GCC 4.4.1 (and 4.4.2) we ran into a warning in hash_table_impl.hpp in Boost 1.40.0: .../include/boost/unordered/detail/hash_table_impl.hpp: In member function 'void boost::unordered_detail::hash_table_data_equivalent_keys<Alloc>:: node_constructor::construct_preamble() [with Alloc = std::allocator<std::pair <const unsigned int, GFL::refcounted_value<const std::basic_string<char, std:: char_traits<char>, std::allocator<char> > > > >]': .../include/boost/unordered/detail/hash_table_impl.hpp:101: error: '<anonymous>' may be used uninitialized in this function Is this problem patchable, or will it manifest itself throughout the code? One way would of course be to turn that particular warning off but I'd prefer to have all warnings enabled if possible. I also tried to compile with Boost 1.39.0 with the same results. Thank you /Marco
On Wed, Oct 21, 2009 at 2:49 PM, Marco Alanen <marco.alanen@sbg.se> wrote:
I'm trying to compile our code in an environment where we treat warnings as errors. This worked fine when we used GCC 4.1.2 which is fairly forgiving when compared to newer versions. However, after upgrading to GCC 4.4.1 (and 4.4.2) we ran into a warning in hash_table_impl.hpp in Boost 1.40.0:
.../include/boost/unordered/detail/hash_table_impl.hpp: In member function 'void boost::unordered_detail::hash_table_data_equivalent_keys<Alloc>:: node_constructor::construct_preamble() [with Alloc = std::allocator<std::pair <const unsigned int, GFL::refcounted_value<const std::basic_string<char, std:: char_traits<char>, std::allocator<char> > > > >]': .../include/boost/unordered/detail/hash_table_impl.hpp:101: error: '<anonymous>' may be used uninitialized in this function
Place could you send an example of code that triggers this warning, as I don't get it. Also, it's a bit confusing as the warning says line 101 while construct_preamble starts at line 184 so can you post the whole of the error? Daniel
Daniel James <daniel_james <at> fmail.co.uk> writes:
Place could you send an example of code that triggers this warning, as I don't get it. Also, it's a bit confusing as the warning says line 101 while construct_preamble starts at line 184 so can you post the whole of the error?
Actually, this might be a bug in gcc and not a problem with Boost. See: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40146 I'll do some more investigation before I start pointing fingers. Thanks /Marco
participants (2)
-
Daniel James
-
Marco Alanen