stl_vector.h?!? (Re: [libstdc++] PATCH: STL allocator cleanup, part 1)

Paolo Carlini pcarlini@suse.de
Fri Dec 19 10:05:00 GMT 2003


Matt Austern wrote:

> Thanks!  I've now checked in the changes to list, vector, deque, and 
> the four hash containers.  I'll do vector<bool>, the four associative 
> containers, and slist next.

Great!
Matt, it looks like there is something wrong with the stl_vector.h 
changes... Running 'make check-performance' I get:

performance/allocator.cc
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h: 
In member function `_Tp* __gnu_norm::_Vector_base<_Tp, 
_Alloc>::_M_allocate(size_t) [with _Tp = int, _Alloc = 
__gnu_cxx::__malloc_alloc<0>]':
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/vector.tcc:244:   
instantiated from `void __gnu_norm::vector<_Tp, 
_Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<_Tp*, 
__gnu_norm::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = int, _Alloc = 
__gnu_cxx::__malloc_alloc<0>]'
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:552:   
instantiated from `void __gnu_norm::vector<_Tp, _Alloc>::push_back(const 
_Tp&) [with _Tp = int, _Alloc = __gnu_cxx::__malloc_alloc<0>]'
/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/testsuite/performance/allocator.cc:162:   
instantiated from here
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:106: 
error: invalid conversion from `void*' to `int*'
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h: 
In member function `_Tp* __gnu_norm::_Vector_base<_Tp, 
_Alloc>::_M_allocate(size_t) [with _Tp = int, _Alloc = 
__gnu_cxx::__mt_alloc<0>]':
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/vector.tcc:244:   
instantiated from `void __gnu_norm::vector<_Tp, 
_Alloc>::_M_insert_aux(__gnu_cxx::__normal_iterator<_Tp*, 
__gnu_norm::vector<_Tp, _Alloc> >, const _Tp&) [with _Tp = int, _Alloc = 
__gnu_cxx::__mt_alloc<0>]'
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:552:   
instantiated from `void __gnu_norm::vector<_Tp, _Alloc>::push_back(const 
_Tp&) [with _Tp = int, _Alloc = __gnu_cxx::__mt_alloc<0>]'
/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/testsuite/performance/allocator.cc:180:   
instantiated from here
/home/paolo/Gcc/cvs-dirs/gcc-head-build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_vector.h:106: 
error: invalid conversion from `void*' to `int*'
/home/paolo/Gcc/cvs-dirs/gcc-head/gcc/libstdc++-v3/scripts/check_performance: 
line 44: ./allocator.exe: No such file or directory

> If you've got any questions about rope, please let me know.  And if 
> you find it too much of a nuisance, I can just go ahead with it.

Agreed.

Paolo.



More information about the Libstdc++ mailing list