podivne chovani freebsd g++

Radim Kolar hsn at netmag.cz
Tue Aug 31 20:16:04 CEST 2004


freebsd g++ 3.4 nebo 3.3 nechce provest auto-konverzi parametru na cost pri volani funkce, coz je naprosto normalni vec pouzivana snad v kazdem softu.

Normalni g++ 3.3 toto nedela. gcc 3.4 normalni jsem nezkousel.

(hsn at ttyv1):/tmp% g++ normalizemime.cc -I /usr/local/include              20:08
normalizemime.cc: In function `std::string robust_iconv(void*, std::string&)':
normalizemime.cc:504: error: invalid conversion from `char**' to `const char**'
normalizemime.cc:504: error:   initializing argument 2 of `size_t libiconv(void*
, const char**, size_t*, char**, size_t*)'
(hsn at ttyv1):/tmp% gcc --version                                           20:08
gcc (GCC) 3.4.2 [FreeBSD] 20040728

495   char *icopy = new char [in_left];
496   assert (icopy);
497
498   char *obuf = buf;
499   memcpy (icopy, message.c_str(), in_left);
500   message.erase ();
501   char *ibuf = icopy;
502
503   while (in_left > 0) {
504     if ((size_t)(-1) == iconv (ic, &ibuf, &in_left, &obuf, &out_left)) {

cely kod programu je na http://hyvatti.iki.fi/~jaakko/spam/. Mam to poslat
jako PR?



More information about the Users-l mailing list