public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/94749] New: std::istream::ignore discards too many characters
@ 2020-04-24 17:12 serpent7776 at gmail dot com
  2020-04-25 14:42 ` [Bug libstdc++/94749] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: serpent7776 at gmail dot com @ 2020-04-24 17:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94749

            Bug ID: 94749
           Summary: std::istream::ignore discards too many characters
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: serpent7776 at gmail dot com
  Target Milestone: ---

Created attachment 48369
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48369&action=edit
full source example

The following code results in '=' assigned to c when using libstdc++, but '+'
is assigned when using libc++, I believe libc++ is correct here

        std::stringstream s(" +=");
        char c;
        s.ignore(1, '+');
        s >> c;

Tested this on godbolt with newest gcc and locally on FreeBSD with gcc7
(command: g++7 -Wall -Wextra -pedantic test.cpp)

https://godbolt.org/z/yS5je8

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-04-19 10:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 17:12 [Bug libstdc++/94749] New: std::istream::ignore discards too many characters serpent7776 at gmail dot com
2020-04-25 14:42 ` [Bug libstdc++/94749] " redi at gcc dot gnu.org
2020-04-27  9:53 ` redi at gcc dot gnu.org
2020-05-29 20:14 ` serpent7776 at gmail dot com
2020-05-29 20:29 ` redi at gcc dot gnu.org
2020-06-11 17:41 ` cvs-commit at gcc dot gnu.org
2020-06-11 17:43 ` redi at gcc dot gnu.org
2020-06-11 20:03 ` serpent7776 at gmail dot com
2020-07-09 21:34 ` redi at gcc dot gnu.org
2020-07-13 11:26 ` cvs-commit at gcc dot gnu.org
2021-04-19 10:40 ` redi at gcc dot gnu.org

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).