This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Analysis of libstdc++/2071 test case
In article <20010509161235.A17645@alinoe.com>,
Carlo Wood <carlo@alinoe.com> writes:
> ~>a.out
> 1234
> 49 50 0
> An output of "1 2" seems highly unlikely, it should be "49 50 0".
Sorry about that, I posted a different version of the test case than
was used to produce the results I included.
Here was the exact version run to produce the results I posted.
#include <stdio.h>
int main ()
{
char buf;
char buf2;
fread (&buf, 1, 1, stdin);
fseek (stdin, 0, SEEK_CUR);
fread (&buf2, 1, 1, stdin);
printf ("%c %c\n", buf, buf2);
}