]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR libstdc++/33734 (iconv_t must not be assumed to be a pointer)
authorPaolo Carlini <pcarlini@suse.de>
Thu, 11 Oct 2007 15:23:11 +0000 (15:23 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 11 Oct 2007 15:23:11 +0000 (15:23 +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: r129235

libstdc++-v3/ChangeLog
libstdc++-v3/include/ext/codecvt_specializations.h

index 6339f998e853d1b6d2406db0e850703f67099f82..72fb22791bcbd944aa081417c44887bad4618c01 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-07  Release Manager
 
        * GCC 4.2.2 released.
index f0a6bbed4d65d0e9902d6956682f0154853aa598..3973d3256d835448cff18716324a2b719467636f 100644 (file)
@@ -128,7 +128,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;
@@ -166,7 +166,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)
        {
@@ -199,7 +199,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);