This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
- From: "peturr02 at ru dot is" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Oct 2003 12:41:19 -0000
- Subject: [Bug libstdc++/11544] wifstream conversion errors result in wrong rdstate()
- References: <20030716094312.11544.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11544
------- Additional Comments From peturr02 at ru dot is 2003-10-08 12:41 -------
Paolo Carlini wrote:
> ... perhaps you believe that rdbuf->sbumpc() should throw an exception in
> this case?
I think that is the only useful solution. Note that there are other reasons
for doing that, such as the one mentioned in PR 11603: If sbumpc() returns
eof() on conversion errors, showmanyc() must always return 0. If showmanyc()
is to be useful, sbumpc() must throw an exception on conversion errors.