From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18372 invoked by alias); 23 Apr 2002 03:16:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 18351 invoked by uid 71); 23 Apr 2002 03:16:01 -0000 Resent-Date: 23 Apr 2002 03:16:01 -0000 Resent-Message-ID: <20020423031601.18350.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, snyder@fnal.gov Received:(qmail 14781 invoked from network); 23 Apr 2002 03:09:58 -0000 Received: from unknown (HELO karma.fnal.gov) (131.225.227.150) by sources.redhat.com with SMTP; 23 Apr 2002 03:09:58 -0000 Received: (from sss@localhost) by karma.fnal.gov (8.11.6/8.11.6) id g3N3A2r12805; Mon, 22 Apr 2002 22:10:02 -0500 Message-Id:<200204230310.g3N3A2r12805@karma.fnal.gov> Date: Mon, 22 Apr 2002 20:16:00 -0000 From: snyder@fnal.gov Reply-To: snyder@fnal.gov To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: libstdc++/6414: g++ 3.1 tellg() regression within last week X-SW-Source: 2002-04/txt/msg01142.txt.bz2 List-Id: >Number: 6414 >Category: libstdc++ >Synopsis: g++ 3.1 tellg() regression within last week >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Mon Apr 22 20:16:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: scott snyder >Release: 3.1 20020422 (prerelease) >Organization: >Environment: System: Linux karma 2.4.9-13 #1 Tue Oct 30 20:11:04 EST 2001 i686 unknown Architecture: i686 host: i686-pc-linux-gnu build: i686-pc-linux-gnu target: i686-pc-linux-gnu configured with: ../egcs/configure --prefix=/usr/local/egcs --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77 >Description: After the input stream changes of the last week, tellg() no longer works correctly. It seems to be returning the raw file position, not taking into account the buffering that libstdc++ does. This seems to happen only if tellg() is called after a read. If a seek intervenes between the read and the tellg(), then the return from tellg() is as expected (consistent with the above, since libstd++ won't have anything buffered at that point). Here's the output i get from the example below: $ g++ -o x x.cc $ ./x 0 177 $ wc x.cc 11 26 176 x.cc $ I expect the second offset printed to be `1'. This worked ok with the 3.1 branch as of about apr 15, so it looks like this was introduced during the past week. sss >How-To-Repeat: - x.cc ------------------------------------------------------------------- #include #include int main () { std::ifstream s ("x.cc"); std::cout << s.tellg() << "\n"; s.get (); std::cout << s.tellg() << "\n"; return 0; } -------------------------------------------------------------------------- >Fix: >Release-Note: >Audit-Trail: >Unformatted: