From mboxrd@z Thu Jan 1 00:00:00 1970 From: pinkfloydhomer@yahoo.com To: gcc-gnats@gcc.gnu.org Subject: libstdc++/3647: in_avail() is not working according to the ISO standard Date: Wed, 11 Jul 2001 06:06:00 -0000 Message-id: <20010711130045.30687.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00295.html List-Id: >Number: 3647 >Category: libstdc++ >Synopsis: in_avail() is not working according to the ISO standard >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Jul 11 06:06:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: pinkfloydhomer@yahoo.com >Release: gcc version 3.0 >Organization: >Environment: cygwin >Description: When calling cin.rdbuf()->in_avail() without any input in the buffer, in_avail() blocks until input is ready, and then returns 1, instead of the number of characters read. This is not adhering to the ISO standard. gcc 2.95.x didn't do that. It correctly returns 0 when nothing is available etc. >How-To-Repeat: #include using namespace std; int main() { // This call blocks, which it shouldn't. cout << cin.rdbuf()->in_avail() << endl; } >Fix: >Release-Note: >Audit-Trail: >Unformatted: