This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



------- Comment #31 from paolo dot carlini at oracle dot com  2010-09-11 04:27 -------
I'm afraid that the situation I outlined in Comment #5 is just the simple one.
The real problem with the new scheme - which tries to deal specially with (0,
cur) by not moving the file pointer - is when *writes* follow the seek. After a
while the buffer becomes full and must be flushed to the file starting at the
logical position corresponding to the previous seek. Thus - it seems to me -
the file pointer must be finally adjusted. How to do that without saving
anything in the filebuf? (note that within the current ABI we cannot add data
members)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]