------- Comment #5 from paolo dot carlini at oracle dot com 2010-09-10 12:36 ------- To clarify: when we start reading in a buffered mode, the first underflow reads the buffer and leaves the physical file at the first char beyond the buffer. If we do afterwards a seek to the current reading position, belonging to the buffer, the physical position along the file also changes of course, an underlying fseek is performed. Then, if we don't refresh the buffer with a new underflow, an inconsistency is born: the physical position along the file doesn't correspond to the first char after the buffer and the next underflow will read from the wrong position.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628