This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/45628] New: std::fstream::tellg invalidates I/O buffer
- From: "potswa at mac dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Sep 2010 06:58:17 -0000
- Subject: [Bug libstdc++/45628] New: std::fstream::tellg invalidates I/O buffer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Querying the position in a file uses filebuf::seekoff( 0, ios::cur ). Although
the Standard specifies that this combination of parameters does not flush
putback or the output sequence, it does anyway, which results in a performance
hit. (§27.8.1.4/11)
Regression:
http://gcc.gnu.org/viewcvs/trunk/libstdc%2B%2B-v3/include/bits/fstream.tcc?r1=68163&r2=68420
(@@ -473,41 +486,26 @@)
This has been broken a long time!
--
Summary: std::fstream::tellg invalidates I/O buffer
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: potswa at mac dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628