This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/37958] num_get<>::do_get(bool) sets eofbit flag incorrectly when boolalpha == true
- From: "paolo dot carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Nov 2008 12:36:04 -0000
- Subject: [Bug libstdc++/37958] num_get<>::do_get(bool) sets eofbit flag incorrectly when boolalpha == true
- References: <bug-37958-16694@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from paolo dot carlini at oracle dot com 2008-11-01 12:36 -------
(In reply to comment #9)
> Declaration
>
> bool __testeof = __beg == __end;
>
> in the patched code means, that implementation always compares (in == end) at
> start, even when input and target sequences are empty (""). In that case, err
> will be set to failbit, which conforms to the example in the standard:
>
> "For empty targets (""), any input sequence yields err == str.failbit"
>
> But input sequence should not be read at all in this case, so comparision (in
> == end) should not be performed!
Ok, I'll special case this, but please let's stop the nitpicking here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37958