Problems with 22_locale/ctor_copy_dtor.cc

Peter Schmid schmid@snake.iap.physik.tu-darmstadt.de
Tue Apr 24 16:21:00 GMT 2001


While examining the failing executable generated from the file
testsuite/22_locale/ctor_copy_dtor.cc, I notice three obscure
warnings, I do not understand. Does that mean there is a bug in the
implementation of codecvt? Especially the final warning seems
strange. Why is the first parameter of the function do_length
discarded?

Peter Schmid 

g++ -o ctor_copy_dtor ctor_copy_dtor.cc -W -Wall -I.
/usr/local/include/g++-v3/bits/codecvt.h: In member function 
   `std::codecvt_base::result std::codecvt<_InternT, _ExternT, 
   std::__enc_traits>::do_out(std::__enc_traits&, const _InternT*, const 
   _InternT*, const _InternT*&, _ExternT*, _ExternT*, _ExternT*&) const [with 
   _InternT = int_type, _ExternT = ext_type]':
/usr/local/include/g++-v3/bits/localefwd.h:88:   instantiated from here
/usr/local/include/g++-v3/bits/codecvt.h:445: warning: comparison between 
   signed and unsigned integer expressions
/usr/local/include/g++-v3/bits/codecvt.h: In member function 
   `std::codecvt_base::result std::codecvt<_InternT, _ExternT, 
   std::__enc_traits>::do_in(std::__enc_traits&, const _ExternT*, const 
   _ExternT*, const _ExternT*&, _InternT*, _InternT*, _InternT*&) const [with 
   _InternT = int_type, _ExternT = ext_type]':
/usr/local/include/g++-v3/bits/localefwd.h:88:   instantiated from here
/usr/local/include/g++-v3/bits/codecvt.h:551: warning: comparison between 
   signed and unsigned integer expressions
/usr/local/include/g++-v3/bits/codecvt.h: In method `int std::codecvt<_InternT, 
   _ExternT, std::__enc_traits>::do_length(const std::__enc_traits&, const 
   _ExternT*, const _ExternT*, unsigned int) const [with _InternT = int_type, 
   _ExternT = ext_type]':
/usr/local/include/g++-v3/bits/localefwd.h:88:   instantiated from here
/usr/local/include/g++-v3/bits/codecvt.h:581: warning: unused parameter `const 
   std::__enc_traits&__state'



More information about the Libstdc++ mailing list