From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22429 invoked by alias); 3 Apr 2002 02:29:59 -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 22407 invoked by uid 61); 3 Apr 2002 02:29:58 -0000 Date: Tue, 02 Apr 2002 18:29:00 -0000 Message-ID: <20020403022958.22406.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, paolo@gcc.gnu.org, ron@vaniwaarden.org, vaniwaar@ca.metsci.com From: bkoz@gcc.gnu.org Reply-To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, paolo@gcc.gnu.org, ron@vaniwaarden.org, vaniwaar@ca.metsci.com, gcc-gnats@gcc.gnu.org Subject: Re: libstdc++/5292: Assumes streambuf::overflow returns character put X-SW-Source: 2002-04/txt/msg00144.txt.bz2 List-Id: Synopsis: Assumes streambuf::overflow returns character put State-Changed-From-To: feedback->closed State-Changed-By: bkoz State-Changed-When: Tue Apr 2 18:29:57 2002 State-Changed-Why: This is not a bug. 27.5.2.2.5 - Put area [lib.streambuf.pub.put] streambuf::sputc returns: if no write, overflow(traits::to_int_type(c)) else traits::to_int_type(c) You'll notice that the libstdc++-v3 implementation does this. 27.5.2.4.5 - Put area [lib.streambuf.virt.put] overflow always returns c on success, unless c == EOF, in which it returns not_eof(). Overflow never returns EOF on success, so your change is not necessary, and indeed, would be non-conforming. Furthermore, your testcase appears to work with current gcc-3.1 sources. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5292