[Bug libstdc++/45628] std::fstream::tellg invalidates I/O buffer

potswa at mac dot com gcc-bugzilla@gcc.gnu.org
Fri Sep 10 16:00:00 GMT 2010

------- Comment #14 from potswa at mac dot com  2010-09-10 15:59 -------
(In reply to comment #13)
> Good, I think we are close to a fix, I'm already testing something. So, do we
> have a symmetric issue with the put area or not? I'm not sure.

I believe so. tellg and tellp are both handled by seekoff( 0, ios::cur ), and
the required behavior doesn't differentiate between them, partly because for an
fstream the get and put pointers are the same. (The result doesn't depend on
the pointers, it comes from fseek.)



More information about the Gcc-bugs mailing list