[Bug libstdc++/26907] Two times filebuf::sungetc() at beginning of file gives undefined result
pcarlini at suse dot de
gcc-bugzilla@gcc.gnu.org
Tue Mar 28 21:15:00 GMT 2006
------- Comment #3 from pcarlini at suse dot de 2006-03-28 21:15 -------
(In reply to comment #2)
> My opinion is, that an abitrary number of sungetc() at the beginning of a file
> should not have the effect, that the next sbumpc() returns the first character
> of the file. Independent to the state of the buffer. This is not the case. The
> example code proves, that under certain cirumstances a sbumpc() does _not_
> return the first character of the file.
And this is not true: any number of sungetc() at the beginning of the file
fails (all return eof()) and the next sbumpc() exactly returns the first char
of file. Indeed, If I run your testcase (with the testcase itself as test.dat)
I get:
#
#-35
And all the implementations I tried (besides v3) do the same.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26907
More information about the Gcc-bugs
mailing list