From 5f2322320155f42550aee3a0d899df5c7a93ba91 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 11 Oct 2007 10:50:09 +0000 Subject: [PATCH] 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: r129232 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/ext/codecvt_specializations.h | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 32449299b3e..9dc29aeea47 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-11 Paolo Carlini * testsuite/25_algorithms/heap/moveable.cc: Fix and extend. diff --git a/libstdc++-v3/include/ext/codecvt_specializations.h b/libstdc++-v3/include/ext/codecvt_specializations.h index c0563acb4ee..ea5b8a1cf3c 100644 --- a/libstdc++-v3/include/ext/codecvt_specializations.h +++ b/libstdc++-v3/include/ext/codecvt_specializations.h @@ -121,7 +121,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; @@ -159,7 +159,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) { @@ -192,7 +192,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); -- 2.30.2