Problem in 27_io/istream_sentry.cc (patch included)
Peter Schmid
schmid@snake.iap.physik.tu-darmstadt.de
Tue Jan 16 16:43:00 GMT 2001
If the function test2() of 27_io/istream_sentry.cc is run on a system that
exposes the behaviour described in libstdc++/944, the while loop never
terminates if eof is not processed correctly. I believe it is the
correct handling of eof that the function test2() is checking. Therefore an
explicit exit of the loop for a misbehaving implementation should be
provided. I apologise if this is a bogus report.
Thanks very much for fixing the problem described in libstdc++/944.
Peter Schmid
*** /home/peter/egcs/gcc/libstdc++-v3/ChangeLog~ Tue Jan 17 18:03:40 2001
--- /home/peter/egcs/gcc/libstdc++-v3/ChangeLog Tue Jan 17 18:03:47 2001
***************
*** 1,3 ****
--- 1,6 ----
+ 2001-01-17 Peter Schmid<schmid@snake.iap.physik.tu-darmstadt.de>
+ Fix 27_io/istream_sentry.cc
+
2001-01-05 Benjamin Kosnik <bkoz@redhat.com>
Fix 27_io/filebuf_members.cc
*** /home/peter/egcs/gcc/libstdc++-v3/testsuite/27_io/istream_sentry.cc~ Wed Jan 17 01:16:56 2001
--- /home/peter/egcs/gcc/libstdc++-v3/testsuite/27_io/istream_sentry.cc Wed Jan 17 01:17:29 2001
*************** test02()
*** 73,78 ****
--- 73,79 ----
while(in >> x)
{
++i;
+ if (i > 3) break;
}
VERIFY( i == 3 );
}
More information about the Libstdc++
mailing list