OSDN Git Service

2003-02-11 Scott Snyder <snyder@fnal.gov>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Feb 2003 19:53:51 +0000 (19:53 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Feb 2003 19:53:51 +0000 (19:53 +0000)
PR libstdc++/9659
* include/bits/fstream.tcc (seekoff): Avoid operator+
for pos_type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62712 138bc75d-0d04-0410-961f-82ee72b054a4

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fstream.tcc

index e02707b..721b0f2 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-11  Scott Snyder  <snyder@fnal.gov>
+
+       PR libstdc++/9659
+       * include/bits/fstream.tcc (seekoff): Avoid operator+
+       for pos_type.
+
 2003-02-11  Paolo Carlini  <pcarlini@unitus.it>
 
        PR libstdc++/9320
index abc7310..8f15604 100644 (file)
@@ -456,9 +456,12 @@ namespace std
              pos_type __tmp =
                _M_file.seekoff(__off, ios_base::cur, __mode);
              if (__tmp >= 0)
-               // Seek successful.
-               __ret = __tmp +
-                 std::max(this->_M_out_cur, this->_M_in_cur) - _M_filepos;
+               {
+                 // Seek successful.
+                 __ret = __tmp;
+                 __ret +=
+                   std::max(this->_M_out_cur, this->_M_in_cur) - _M_filepos;
+               }
            }
        }
       _M_last_overflowed = false;