public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/4703: filebuf::in_avail() not correct
@ 2001-10-26 13:16 David Rasmussen
  0 siblings, 0 replies; 2+ messages in thread
From: David Rasmussen @ 2001-10-26 13:16 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4703
>Category:       libstdc++
>Synopsis:       filebuf::in_avail() not correct
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 26 13:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     David Rasmussen <pinkfloydhomer at yahoo dot com>
>Release:        gcc-3.x
>Organization:
>Environment:
linux
>Description:
http://gcc.gnu.org/ml/libstdc++/2001-10/msg00172.html

#include <iostream>

int main()
{
        std::cout << std::cin.rdbuf()->in_avail() << std::endl;

        return 0;
}

This simple code should write a 0 and exit immediately. This is what happens 
with gcc 2.95.3 and the library that comes with that. With gcc 3.0.2, it is 
hanging blockingly until enter is pressed, and then writes a 1. Code that 
checks the buffer in this way does not expect execution to blocked by input. 
It expects and answer immediately. This is a huge problem, and I can't 
imagine that it hasn't been solved?


>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: libstdc++/4703: filebuf::in_avail() not correct
@ 2001-10-26 13:31 pme
  0 siblings, 0 replies; 2+ messages in thread
From: pme @ 2001-10-26 13:31 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, pinkfloydhomer, 

Synopsis: filebuf::in_avail() not correct

State-Changed-From-To: open->closed
State-Changed-By: pme
State-Changed-When: Fri Oct 26 13:31:03 2001
State-Changed-Why:
    Duplicate of 3647.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4703&database=gcc


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-26 13:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-26 13:16 libstdc++/4703: filebuf::in_avail() not correct David Rasmussen
2001-10-26 13:31 pme

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).