Summary: | istream::sentry::sentry() handles eof() incorrectly. | ||
---|---|---|---|
Product: | gcc | Reporter: | Pétur Runólfsson <peturrun> |
Component: | libstdc++ | Assignee: | Benjamin Kosnik <bkoz> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs |
Priority: | P2 | ||
Version: | 3.4.0 | ||
Target Milestone: | 3.3.3 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2003-10-22 20:06:40 | |
Attachments: | Test case |
Description
Pétur Runólfsson
2003-09-16 08:36:24 UTC
Created attachment 4770 [details]
Test case
I can confirm this on the mainline (20030925). Subject: Bug 12297 CVSROOT: /cvs/gcc Module name: gcc Changes by: bkoz@gcc.gnu.org 2003-11-26 22:45:57 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/include/bits: istream.tcc Added files: libstdc++-v3/testsuite/27_io/basic_istream/sentry/char: 12297.cc Log message: 2003-11-26 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/12297 * include/bits/istream.tcc (basic_istream::sentry::sentry): Set failbit and eofbit when eof. * testsuite/27_io/basic_istream/sentry/char/12297.cc: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&r1=1.2110&r2=1.2111 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&r1=1.56&r2=1.57 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/testsuite/27_io/basic_istream/sentry/char/12297.cc.diff?cvsroot=gcc&r1=NONE&r2=1.1 Subject: Bug 12297 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_3-branch Changes by: bkoz@gcc.gnu.org 2003-11-26 22:49:28 Modified files: libstdc++-v3 : ChangeLog libstdc++-v3/include/bits: istream.tcc Log message: 2003-11-26 Benjamin Kosnik <bkoz@redhat.com> PR libstdc++/12297 * include/bits/istream.tcc (basic_istream::sentry::sentry): Set failbit and eofbit when eof. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.1464.2.155&r2=1.1464.2.156 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libstdc++-v3/include/bits/istream.tcc.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.36.4.7&r2=1.36.4.8 Fixed for 3.3.3. |