This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: libstdc++/9533: Regression: Can't read from tty with ifstream
- From: Pétur Runólfsson <peturr02 at ru dot is>
- To: <paolo at gcc dot gnu dot org>,<gcc-bugs at gcc dot gnu dot org>,<gcc-prs at gcc dot gnu dot org>,<nobody at gcc dot gnu dot org>,Pétur Runólfsson <peturr02 at ru dot is>,<gcc-gnats at gcc dot gnu dot org>
- Date: Mon, 3 Mar 2003 10:44:37 -0000
- Subject: RE: libstdc++/9533: Regression: Can't read from tty with ifstream
> Something is wrong, agreed, but I cannot reproduce the
> regression thing: for me (*), 3.2.2 asks the number but
> then hangs upon <newline>. Same behaviour 3.0.4.
Just to clarify, this is of course correct behaviour since the
input stream is in fully buffered mode (*). The "hang" happens
because filebuf::underflow() blocks until either BUFSIZ
characters are entered or EOF occurs.
Petur
* The reason the test case uses fully buffered is that
unbuffered doesn't work (libstdc++/9024).