re PR libstdc++/33734 (iconv_t must not be assumed to be a pointer)
authorPaolo Carlini <pcarlini@suse.de>
Thu, 11 Oct 2007 10:50:09 +0000 (10:50 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 11 Oct 2007 10:50:09 +0000 (10:50 +0000)
2007-10-11  Paolo Carlini  <pcarlini@suse.de>

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
libstdc++-v3/include/ext/codecvt_specializations.h

index 32449299b3e72ae2ccddfff97c57aaca6a8177f0..9dc29aeea47f503850d437e1a58dd3c88786bc67 100644 (file)
@@ -1,3 +1,9 @@
+2007-10-11  Paolo Carlini  <pcarlini@suse.de>
+
+       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  <pcarlini@suse.de>
 
        * testsuite/25_algorithms/heap/moveable.cc: Fix and extend.
index c0563acb4eeb162d52377d54a930f7a18c634c05..ea5b8a1cf3cc979a0d789bb7508a1089186637c3 100644 (file)
@@ -121,7 +121,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
     bool
     good() const throw()
     { 
-      const descriptor_type __err = reinterpret_cast<iconv_t>(-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<iconv_t>(-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<iconv_t>(-1);
+      const descriptor_type __err = (iconv_t)(-1);
       if (_M_in_desc && _M_in_desc != __err) 
        {
          iconv_close(_M_in_desc);