From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8201 invoked by alias); 25 Jan 2003 12:06:01 -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 8182 invoked by uid 71); 25 Jan 2003 12:06:01 -0000 Resent-Date: 25 Jan 2003 12:06:01 -0000 Resent-Message-ID: <20030125120601.8180.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, peturr02@ru.is Received: (qmail 7180 invoked by uid 48); 25 Jan 2003 11:57:17 -0000 Message-Id: <20030125115717.7179.qmail@sources.redhat.com> Date: Sat, 25 Jan 2003 12:06:00 -0000 From: peturr02@ru.is Reply-To: peturr02@ru.is To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libstdc++/9439: filebuf::sputbackc ignores beginning-of-file X-SW-Source: 2003-01/txt/msg01457.txt.bz2 List-Id: >Number: 9439 >Category: libstdc++ >Synopsis: filebuf::sputbackc ignores beginning-of-file >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Sat Jan 25 12:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: peturr02@ru.is >Release: gcc-3.2.1 >Organization: >Environment: Red Hat Linux 8.0 >Description: filebuf::sputbackc succeeds even if the filebuf is already at the beginning of the file. I don't think this makes much sense, sputbackc should fail at the beginning. >How-To-Repeat: See attachment. >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/plain; name="pbackfailbug2.cc" Content-Disposition: inline; filename="pbackfailbug2.cc" #include #include using namespace std; #undef NDEBUG #include int main() { filebuf fbuf; fbuf.open("pbackfailbug2.cc", ios_base::in); int r = fbuf.sputbackc('a'); assert(r == EOF); return 0; }