This is the mail archive of the libstdc++@sources.redhat.com 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]

Re: [PATCH] codecvt.h


On Mon, Nov 06, 2000 at 10:55:45AM -0800, Ulrich Drepper wrote:
> David Edelsohn <dje@watson.ibm.com> writes:
> 
> > 	Both AIX and Glibc declare the second argument to iconv() as
> > "const char **".
> 
> No.  The code is correct as it is.  Don't change anything.

Then... what /should/ be changed?  The iconv()'s I see all take a second
argument of 'const char **'.  The testsuites fail due to that mismatch:

/tec/build/Ebuild/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]':
/tec/build/Ebuild/include/g++-v3/bits/localefwd.h:91:   instantiated from here
/tec/build/Ebuild/include/g++-v3/bits/codecvt.h:412: cannot convert `char**' to 
   `const char**' for argument `2' to `size_t iconv(_iconv_info*, const char**, 
   size_t*, char**, size_t*)'

I don't mean to sound sarcastic or anything, but please explain what part
of this is correct code.  As David wrote, the ChangeLogs show that the
const-ness flips back and forth.


Phil

-- 
pedwards at disaster dot jaj dot com  |  pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools.  Fools are protected by more capable fools.

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