public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator
@ 2020-11-04 20:42 rodgertq at gcc dot gnu.org
  2020-11-04 21:38 ` [Bug libstdc++/97719] [11 Regression] " redi at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: rodgertq at gcc dot gnu.org @ 2020-11-04 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97719
           Summary: "Implement C++20 features for <sstream>" changed
                    behavior of istreambuf_iterator
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rodgertq at gcc dot gnu.org
  Target Milestone: ---

from mailing list -

On 07/10/2020 18:55, Thomas Rodgers wrote:
From: Thomas Rodgers <trodgers@redhat.com>
New ctors and ::view() accessor for -
  * basic_stingbuf
  * basic_istringstream
  * basic_ostringstream
  * basic_stringstreamm
New ::get_allocator() accessor for basic_stringbuf.
I found that this
<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=a0e4d7b44c544c84cffc7ff9c64b6f1af14fb08d>
"libstdc++: Implement C++20 features for <sstream>" changed the behavior of

$ cat test.cc
#include <iostream>
#include <iterator>
#include <sstream>
int main() {
 std::stringstream s("a");
 std::istreambuf_iterator<char> i(s);
 if (i != std::istreambuf_iterator<char>()) std::cout << *i << '\n';
}
$ g++ -std=c++20 test.cc
$ ./a.out

from printing "a" to printing nothing.  (The `i != ...` comparison appears to
change i from pointing at "a" to pointing to null, and returns false.)

I ran into this when building LibreOffice, and I hope test.cc is a faithfully
minimized reproducer.  However, I know little about std::istreambuf_iterator,
so it may well be that the code isn't even valid.

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

* [Bug libstdc++/97719] [11 Regression] "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator
  2020-11-04 20:42 [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator rodgertq at gcc dot gnu.org
@ 2020-11-04 21:38 ` redi at gcc dot gnu.org
  2020-11-04 21:38 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-04 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-04
             Status|UNCONFIRMED                 |NEW
            Summary|"Implement C++20 features   |[11 Regression] "Implement
                   |for <sstream>" changed      |C++20 features for
                   |behavior of                 |<sstream>" changed behavior
                   |istreambuf_iterator         |of istreambuf_iterator
      Known to work|                            |10.2.0
      Known to fail|                            |11.0
   Target Milestone|---                         |11.0
     Ever confirmed|0                           |1
           Keywords|                            |wrong-code
           Assignee|rodgertq at gcc dot gnu.org        |unassigned at gcc dot gnu.org

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

* [Bug libstdc++/97719] [11 Regression] "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator
  2020-11-04 20:42 [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator rodgertq at gcc dot gnu.org
  2020-11-04 21:38 ` [Bug libstdc++/97719] [11 Regression] " redi at gcc dot gnu.org
@ 2020-11-04 21:38 ` redi at gcc dot gnu.org
  2020-11-04 23:41 ` cvs-commit at gcc dot gnu.org
  2020-11-04 23:41 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-04 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |redi at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

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

* [Bug libstdc++/97719] [11 Regression] "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator
  2020-11-04 20:42 [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator rodgertq at gcc dot gnu.org
  2020-11-04 21:38 ` [Bug libstdc++/97719] [11 Regression] " redi at gcc dot gnu.org
  2020-11-04 21:38 ` redi at gcc dot gnu.org
@ 2020-11-04 23:41 ` cvs-commit at gcc dot gnu.org
  2020-11-04 23:41 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-04 23:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:

https://gcc.gnu.org/g:8f565d255a3157828e45f8b9844b3d156193c182

commit r11-4729-g8f565d255a3157828e45f8b9844b3d156193c182
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Wed Nov 4 21:44:05 2020 +0000

    libstdc++: Fix default mode of new basic_stringstream constructor [PR
97719]

    libstdc++-v3/ChangeLog:

            PR libstdc++/97719
            * include/std/sstream (basic_stringstream(string_type&&,
openmode)):
            Fix default argument.
            * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.

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

* [Bug libstdc++/97719] [11 Regression] "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator
  2020-11-04 20:42 [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator rodgertq at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-04 23:41 ` cvs-commit at gcc dot gnu.org
@ 2020-11-04 23:41 ` redi at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2020-11-04 23:41 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
.

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

end of thread, other threads:[~2020-11-04 23:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-04 20:42 [Bug libstdc++/97719] New: "Implement C++20 features for <sstream>" changed behavior of istreambuf_iterator rodgertq at gcc dot gnu.org
2020-11-04 21:38 ` [Bug libstdc++/97719] [11 Regression] " redi at gcc dot gnu.org
2020-11-04 21:38 ` redi at gcc dot gnu.org
2020-11-04 23:41 ` cvs-commit at gcc dot gnu.org
2020-11-04 23:41 ` 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).