id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 5284,gcc-4.4.3 compiler warnings with Interprocess+Intrusive,Danny Mitzel ,Ion Gaztañaga,"I've been using Boost Interprocess managed_shared_memory for a short time. My project was previously using a cross compiler environment based on gcc-4.4.0/glibc-2.3.6 but is moving to gcc-4.4.3/glibc-2.11.1. gcc-4.4.3 with -O2 is started generating compiler warnings in the Intrusive library when I attempt to execute the construct() method on managed_shared_memory object. -O0 and -O1 are still happy. I'm wondering if anyone else has seen similar, has suggestions on debug/fix, or does this appear to be compiler issue? Program snippet: #include ""boost/interprocess/managed_shared_memory.hpp"" #include //std::system #include int main(int argc, char *argv[]) { using namespace boost::interprocess; typedef std::pair MyType; //Construct managed shared memory managed_shared_memory segment(create_only, ""MySharedMemory"", 65536); //Create an object of MyType initialized to {0.0, 0} MyType *instance = segment.construct (""MyType instance"") //name of the object (0.0, 0); //ctor first argument return 0; } Compiler output: gcc-4.4.3-glibc-2.11.1-grte/x86/bin/g++ -ld -MD -MP -g -O2 -Wall -Werror -fno-omit-frame-pointer -Wno-error -Wno-deprecated -fpic -I/home/mitzel/src/boost_1_46_0 -c -o test.o test.cc In file included from /home/mitzel/src/boost_1_46_0/boost/intrusive/rbtree_algorithms.hpp:58, from /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/rbtree_node.hpp:20, from /home/mitzel/src/boost_1_46_0/boost/intrusive/set_hook.hpp:20, from /home/mitzel/src/boost_1_46_0/boost/intrusive/rbtree.hpp:25, from /home/mitzel/src/boost_1_46_0/boost/intrusive/set.hpp:19, from /home/mitzel/src/boost_1_46_0/boost/interprocess/mem_algo/rbtree_best_fit.hpp:47, from /home/mitzel/src/boost_1_46_0/boost/interprocess/detail/managed_memory_impl.hpp:22, from /home/mitzel/src/boost_1_46_0/boost/interprocess/managed_shared_memory.hpp:21, from test.cc:1: /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/tree_algorithms.hpp: In static member function 'static typename NodeTraits::node_ptr boost::intrusive::detail::tree_algorithms::minimum(typename NodeTraits::node_ptr) [with NodeTraits = boost::intrusive::rbtree_node_traits, true>]': /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/tree_algorithms.hpp:490: warning: '' may be used uninitialized in this function /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/tree_algorithms.hpp: In static member function 'static typename NodeTraits::node_ptr boost::intrusive::detail::tree_algorithms::maximum(typename NodeTraits::node_ptr) [with NodeTraits = boost::intrusive::rbtree_node_traits, true>]': /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/tree_algorithms.hpp:507: warning: '' may be used uninitialized in this function /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/utilities.hpp: In static member function 'static void boost::intrusive::detail::tree_algorithms::insert_equal_check_impl( bool, typename NodeTraits::node_ptr, typename NodeTraits::node_ptr, NodePtrCompare, boost::intrusive::detail::tree_algorithms::insert_commit_data&, size_t*) [with NodePtrCompare = boost::intrusive::detail::key_nodeptr_comp::block_ctrl>, boost::intrusive::rbtree_impl::block_ctrl, boost::intrusive::rbtree_node_traits, true>, (boost::intrusive::link_mode_type)0u, boost::intrusive::default_tag, 3>, std::less::block_ctrl>, long unsigned int, true> > >, NodeTraits = boost::intrusive::rbtree_node_traits, true>]': /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/utilities.hpp:234: warning: '' may be used uninitialized in this function /home/mitzel/src/boost_1_46_0/boost/intrusive/detail/utilities.hpp:234: note: '' was declared here thanks for your time and any suggestions. danny ",Bugs,new,To Be Determined,intrusive,Boost 1.46.0,Problem,,,