[v3] stl enums
Gerald Pfeifer
pfeifer@dbai.tuwien.ac.at
Sun Mar 10 22:56:00 GMT 2002
On Wed, 6 Mar 2002, Benjamin Kosnik wrote:
> As per discussion.
>
> gcc
> gcc-3_1-branch
>
> 2002-03-06 Benjamin Kosnik <bkoz@redhat.com>
> Stephen M. Webb <stephen.webb@bregmasoft.com>
>
> * include/bits/stl_tree.h (_S_rb_tree_red): Make enum.
> (_S_rb_tree_black): Make enum.
> Clean. Format.
> * include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum.
> * include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum.
> (__stl_threshold): _M_threshold, enum.
> * src/stl-inst.cc: Same.
> * config/linker-map.gnu: Remove.
>
> * testsuite/23_containers/vector_bool.cc: New.
I'm afraid this patch is responsible for an xterm full of warning messages
(even though it's just one warning ;-) ), when compiling the following
snippet with -W:
#include <algorithm>
#include <vector>
using namespace std;
typedef vector<bool> BOOLS;
void f() {
BOOLS v, w;
copy(v.begin(),v.end(),inserter(w,w.end()));
}
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_bvector.h: In member function
`void std::vector<bool, _Alloc>::_M_insert_aux(std::_Bit_iterator, bool)
[with _Alloc = std::allocator<bool>]':
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_bvector.h:641: instantiated from `std::_Bit_iterator std::vector<bool, _Alloc>::insert(std::_Bit_iterator, bool) [with _Alloc = std::allocator<bool>]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_iterator.h:515: instantiated from `std::insert_iterator<_Container>& std::insert_iterator<_Container>::operator=(typename _Container::const_reference) [with _Container = BOOLS]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_algobase.h:241: instantiated from `_OutputIter std::__copy(_RandomAccessIter, _RandomAccessIter, _OutputIter, std::random_access_iterator_tag) [with _RandomAccessIter = std::_Bit_iterator, _OutputIter = std::insert_iterator<BOOLS>]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_algobase.h:266: instantiated from `_OutputIter std::__copy_aux2(_InputIter, _InputIter, _OutputIter, __true_type) [with _InputIter = std::_Bit_iterator, _OutputIter = std::insert_iterator<BOOLS>]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_algobase.h:303: instantiated from `_OutputIter std::__copy_ni2(_InputIter, _InputIter, _OutputIter, __false_type) [with _InputIter = std::_Bit_iterator, _OutputIter = std::insert_iterator<BOOLS>]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_algobase.h:323: instantiated from `_OutputIter std::__copy_ni1(_InputIter, _InputIter, _OutputIter, __false_type) [with _InputIter = std::_Bit_iterator, _OutputIter = std::insert_iterator<BOOLS>]'
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_algobase.h:349: instantiated from `_OutputIter std::copy(_InputIter, _InputIter, _OutputIter) [with _InputIter = std::_Bit_iterator, _OutputIter = std::insert_iterator<BOOLS>]'
x.cc:11: instantiated from here
/sw/test/gcc/FreeBSD/include/g++-v3/bits/stl_bvector.h:394: warning: enumeral
and non-enumeral type in conditional expression
Gerald
More information about the Gcc-patches
mailing list