This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Fix libstdc++/9659
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 11 Feb 2003 20:57:08 +0100
- Subject: [v3] Fix libstdc++/9659
Hi,
tested x86-linux, reviewd by myself and Nathan (thanks!)
Paolo.
//////////
2003-02-11 Scott Snyder <snyder@fnal.gov>
PR libstdc++/9659
* include/bits/fstream.tcc (seekoff): Avoid operator+
for pos_type.
*** fstream.tcc.~1.47.~ Tue Feb 4 23:42:32 2003
--- fstream.tcc Tue Feb 11 12:06:29 2003
*************** namespace std
*** 456,464 ****
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;
}
}
_M_last_overflowed = false;
--- 456,467 ----
pos_type __tmp =
_M_file.seekoff(__off, ios_base::cur, __mode);
if (__tmp >= 0)
! {
! // Seek successful.
! __ret = __tmp;
! __ret +=
! std::max(this->_M_out_cur, this->_M_in_cur) - _M_filepos;
! }
}
}
_M_last_overflowed = false;