This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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]

Re: [v3] stl enums



> 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:

try this

2002-03-11  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_bvector.h: Fix warning.

Index: include/bits/stl_bvector.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/stl_bvector.h,v
retrieving revision 1.13
diff -c -p -r1.13 stl_bvector.h
*** stl_bvector.h	2002/03/11 22:36:30	1.13
--- stl_bvector.h	2002/03/12 01:03:10
*************** template <typename _Alloc> 
*** 392,398 ****
          ++_M_finish;
        }
        else {
!         size_type __len = size() ? 2 * size() : _M_word_bit;
          _Bit_type * __q = _M_bit_alloc(__len);
          iterator __i = copy(begin(), __position, iterator(__q, 0));
          *__i++ = __x;
--- 392,399 ----
          ++_M_finish;
        }
        else {
!         size_type __len = size() 
! 	                  ? 2 * size() : static_cast<size_type>(_M_word_bit);
          _Bit_type * __q = _M_bit_alloc(__len);
          iterator __i = copy(begin(), __position, iterator(__q, 0));
          *__i++ = __x;


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