[Bug libstdc++/12048] [3.4 Regression] unget does not work
rittle at latour dot rsch dot comm dot mot dot com
gcc-bugzilla@gcc.gnu.org
Tue Aug 26 07:05:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12048
------- Additional Comments From rittle at latour dot rsch dot comm dot mot dot com 2003-08-26 07:05 -------
Subject: Re: [3.4 Regression] unget does not work
(Independently arrived at this, thus I concur with the rename
and critical upgrade...)
#include <iostream>
#include <testsuite_hooks.h>
// Derived from libstdc++/12048 by LJR. Exercise for the reader to
// figure out how to get this interactive test into our dejagnu...
// Rewriting the test to use an opened fstream displays no failure...
int main()
{
bool test = true;
char c1;
char c2;
std::cin.get(c1);
std::cin.unget();
std::cin.get(c2);
VERIFY (c1 == c2);
}
More information about the Gcc-bugs
mailing list