public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "paolo dot carlini at oracle dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/37958] num_get<>::do_get(bool) sets eofbit flag incorrectly when boolalpha == true
Date: Thu, 30 Oct 2008 16:09:00 -0000	[thread overview]
Message-ID: <20081030160700.18369.qmail@sourceware.org> (raw)
In-Reply-To: <bug-37958-16694@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from paolo dot carlini at oracle dot com  2008-10-30 16:07 -------
(In reply to comment #0)
> It seems that implementation always set str.eofbit when after call of the
> function (in == end).
> 
> But standard states(22.2.2.1.2, p16) that this flag should be set only when:
> "if, when seeking another character to match, it is found that (in == end)" (on
> success)
> or "if the reason for the failure was that (in == end)" (on fail)
> 
> This conditions are not the same as simply (in == end).

Frankly, I don't get it. In my reading of the standard, either when val is set
or val is not set, when in == end at the end then we have eofbit. Maybe you
should simply attach a testcase where the behavior is incorrect, the provided
one is fine (and consistent with the general behavior for numeric parsing).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37958


  reply	other threads:[~2008-10-30 16:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30 15:01 [Bug libstdc++/37958] New: " tsyvarev at ispras dot ru
2008-10-30 16:09 ` paolo dot carlini at oracle dot com [this message]
2008-10-30 16:17 ` [Bug libstdc++/37958] " paolo dot carlini at oracle dot com
2008-10-30 16:53 ` paolo dot carlini at oracle dot com
2008-10-31 10:36 ` tsyvarev at ispras dot ru
2008-10-31 10:37 ` paolo dot carlini at oracle dot com
2008-10-31 10:49 ` tsyvarev at ispras dot ru
2008-10-31 16:50 ` paolo at gcc dot gnu dot org
2008-10-31 16:51 ` paolo dot carlini at oracle dot com
2008-11-01 12:22 ` tsyvarev at ispras dot ru
2008-11-01 12:37 ` paolo dot carlini at oracle dot com
2008-11-01 15:53 ` tsyvarev at ispras dot ru
2008-11-01 16:03 ` tsyvarev at ispras dot ru
2008-11-01 16:20 ` paolo at gcc dot gnu dot org
2008-11-01 16:23 ` paolo dot carlini at oracle dot com
2008-11-01 18:44 ` tsyvarev at ispras dot ru
2008-11-01 18:49 ` paolo dot carlini at oracle dot com
2008-11-01 19:06 ` paolo dot carlini at oracle dot com
2008-11-01 22:12 ` paolo at gcc dot gnu dot org
2008-11-06  7:17 ` tsyvarev at ispras dot ru
2008-11-06 11:54 ` paolo dot carlini at oracle dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081030160700.18369.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).