From: Paolo Carlini Date: Thu, 11 Oct 2007 15:23:11 +0000 (+0000) Subject: re PR libstdc++/33734 (iconv_t must not be assumed to be a pointer) X-Git-Tag: prereleases/gcc-4.2.3-rc1~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9725e309bf95218c25b76a24cc4575a3e3bd1a2a;p=thirdparty%2Fgcc.git re PR libstdc++/33734 (iconv_t must not be assumed to be a pointer) 2007-10-11 Paolo Carlini PR libstdc++/33734 * include/ext/codecvt_specializations.h (encoding_state::good, init, destroy): Use cast notation instead of reinterpret_cast. From-SVN: r129235 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 6339f998e853..72fb22791bcb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2007-10-11 Paolo Carlini + + PR libstdc++/33734 + * include/ext/codecvt_specializations.h (encoding_state::good, + init, destroy): Use cast notation instead of reinterpret_cast. + 2007-10-07 Release Manager * GCC 4.2.2 released. diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h index f0a6bbed4d65..3973d3256d83 100644 --- a/libstdc++-v3/include/ext/codecvt_specializations.h +++ b/libstdc++-v3/include/ext/codecvt_specializations.h @@ -128,7 +128,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) bool good() const throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); bool __test = _M_in_desc && _M_in_desc != __err; __test &= _M_out_desc && _M_out_desc != __err; return __test; @@ -166,7 +166,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void init() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); const bool __have_encodings = _M_int_enc.size() && _M_ext_enc.size(); if (!_M_in_desc && __have_encodings) { @@ -199,7 +199,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void destroy() throw() { - const descriptor_type __err = reinterpret_cast(-1); + const descriptor_type __err = (iconv_t)(-1); if (_M_in_desc && _M_in_desc != __err) { iconv_close(_M_in_desc);