From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 493 invoked by alias); 27 Sep 2002 16: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 479 invoked by uid 71); 27 Sep 2002 16:16:02 -0000 Date: Fri, 27 Sep 2002 09:16:00 -0000 Message-ID: <20020927161602.478.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Jonathan Lennox Subject: Re: libstdc++/8071: basic_ostream::operator<<(streambuf*) loops forever if streambuf::underflow() leaves gptr() NULL Reply-To: Jonathan Lennox X-SW-Source: 2002-09/txt/msg00749.txt.bz2 List-Id: The following reply was made to PR libstdc++/8071; it has been noted by GNATS. From: Jonathan Lennox To: gcc-gnats@gcc.gnu.org Cc: Subject: Re: libstdc++/8071: basic_ostream::operator<<(streambuf*) loops forever if streambuf::underflow() leaves gptr() NULL Date: Fri, 27 Sep 2002 12:10:26 -0400 --prVVYBvZNE Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Here is the additional code, which uses the header file previously attached. --prVVYBvZNE Content-Type: text/plain Content-Disposition: inline; filename="test-syncstream.cxx" Content-Transfer-Encoding: 7bit #include "syncstream.h" using namespace std; int main(int argc, char *argv[]) { if (argc < 2) { cerr << "Usage: " << argv[0] << " [file]" << endl; exit(2); } FILE* c_file = fopen(argv[1], "r"); if (c_file == NULL) { perror(argv[1]); exit(1); } isyncstream cxx_file(c_file); cout << cxx_file.rdbuf(); exit(0); } --prVVYBvZNE--