This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/14783] New: Warning in std::set constructor at bits/stl_tree.h:403


Current version CVS mainline gcc (3.5.0 20040330) 
generate warning
---8X------------------------------
/home/wanderer/pkg/gcc/include/g++/bits/stl_tree.h: In constructor 
`std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, 
_Alloc>::_Rb_tree_impl<_Key_compare, _Is_pod_comparator>::_Rb_tree_impl
(consttypename _Alloc::rebind<std::_Rb_tree_node<_Val> >::other&, 
const_Key_compare&) [with _Key_compare = std::less<Class*>, bool 
_Is_pod_comparator = false, _Key = Class*, _Val = Class*, _KeyOfValue = 
std::_Identity<Class*>, _Compare = std::less<Class*>, _Alloc = 
std::allocator<Class*>]':
/home/wanderer/pkg/gcc/include/g++/bits/stl_tree.h:550:   instantiated from 
`std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Rb_tree
(const_Compare&, const_Alloc&) [with _Key = Class*, _Val = Class*, _KeyOfValue 
= std::_Identity<Class*>, _Compare = std::less<Class*>, _Alloc = 
std::allocator<Class*>]'
/home/wanderer/pkg/gcc/include/g++/bits/stl_set.h:150:   instantiated from 
`__gnu_norm::set<_Key, _Compare, _Alloc>::set() [with _Key = Class*, _Compare 
= std::less<Class*>, _Alloc = std::allocator<Class*>]'
Test.cc:6:   instantiated from here
/home/wanderer/pkg/gcc/include/g++/bits/stl_tree.h:398: warning: 
`std::_Rb_tree<Class*, Class*, std::_Identity<Class*>, std::less<Class*>, 
std::allocator<Class*> >::_Rb_tree_impl<std::less<Class*>,  
false>::_M_node_count' will be initialized after
/home/wanderer/pkg/gcc/include/g++/bits/stl_tree.h:396: warning:   
`std::less<Class*> std::_Rb_tree<Class*, Class*, std::_Identity<Class*>, 
std::less<Class*>, std::allocator<Class*> >::_Rb_tree_impl<std::less<Class*>,  
false>::_M_key_compare'
/home/wanderer/pkg/gcc/include/g++/bits/stl_tree.h:403: warning:   when 
initialized here
---X8------------------------------

for test code (with command line: g++ -Wall Test.cc):
---8X------------------------------
#include<set>

class Class {};

int main() {
  std::set<Class*> mySet;
  return 0;
}
---X8------------------------------

-- 
           Summary: Warning in std::set constructor at bits/stl_tree.h:403
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wanderer at rsu dot ru
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-unknown-freebsd5.1
  GCC host triplet: i386-unknown-freebsd5.1
GCC target triplet: i386-unknown-freebsd5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14783


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]