From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14701 invoked by alias); 10 Sep 2010 17:29:55 -0000 Received: (qmail 14668 invoked by uid 48); 10 Sep 2010 17:29:41 -0000 Date: Fri, 10 Sep 2010 17:29:00 -0000 Message-ID: <20100910172941.14667.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libstdc++/45628] std::fstream::tellg invalidates I/O buffer In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "paolo dot carlini at oracle dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-09/txt/msg01389.txt.bz2 ------- Comment #18 from paolo dot carlini at oracle dot com 2010-09-10 17:29 ------- I'm almost ready for the patch, please be patient ;) If look at the standard, it says that the last step of seekoff is *always* as if calling fseek(..., off * width, ...). If look at the current code, we have the concept of __computed_off and, in many cases we end up calling the equivalent of fseek with something != off * width. I'm changing that to (0, cur) for the case you care about, but not changing anything else otherwise. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45628