summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/include/bits/fstream.tcc9
2 files changed, 12 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index e02707b2a42..721b0f267b6 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc
index abc7310e32d..8f156040fe0 100644
--- a/libstdc++-v3/include/bits/fstream.tcc
+++ b/libstdc++-v3/include/bits/fstream.tcc
@@ -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;