]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libstdc++/60734 (Undefined behavior in g++-v4/bits/stl_tree.h)
authorJonathan Wakely <jwakely@redhat.com>
Tue, 3 Jun 2014 17:58:51 +0000 (18:58 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Tue, 3 Jun 2014 17:58:51 +0000 (18:58 +0100)
Backport from mainline
2014-04-15  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/60734
* include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.

From-SVN: r211197

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/stl_tree.h

index 0c11cf26f38a7e99ad6f54bd85594389748bd2af..4736ae49014337a61efb214d9c0c03e624a1fdfe 100644 (file)
@@ -1,3 +1,11 @@
+2014-06-03  Jonathan Wakely  <jwakely@redhat.com>
+
+       Backport from mainline
+       2014-04-15  Jonathan Wakely  <jwakely@redhat.com>
+
+       PR libstdc++/60734
+       * include/bits/stl_tree.h (_Rb_tree::_M_end): Fix invalid cast.
+
 2014-05-29  Jonathan Wakely  <jwakely@redhat.com>
 
        * include/tr2/bool_set: Use UTF-8 for accented characters.
index 91bf4df451144efe7250d1375da60685d94a2267..a9bd3d6fe6fbf6a82d8da0d818a83b3ce5521dd5 100644 (file)
@@ -510,11 +510,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
       _Link_type
       _M_end()
-      { return static_cast<_Link_type>(&this->_M_impl._M_header); }
+      { return reinterpret_cast<_Link_type>(&this->_M_impl._M_header); }
 
       _Const_Link_type
       _M_end() const
-      { return static_cast<_Const_Link_type>(&this->_M_impl._M_header); }
+      { return reinterpret_cast<_Const_Link_type>(&this->_M_impl._M_header); }
 
       static const_reference
       _S_value(_Const_Link_type __x)