public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/111145] New: istream::operator>>(streambuf*) does not set gcount
@ 2023-08-24 21:04 admin at computerquip dot com
  0 siblings, 0 replies; only message in thread
From: admin at computerquip dot com @ 2023-08-24 21:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111145
           Summary: istream::operator>>(streambuf*) does not set gcount
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: admin at computerquip dot com
  Target Milestone: ---

Example code: https://godbolt.org/z/cW9Pe1c85
```
#include <sstream>
#include <iostream>

int main()
{
    std::ostringstream oss;
    std::istringstream iss("test");

    iss >> oss.rdbuf();

    std::cout << "gcount is " << iss.gcount() << "\n";
}
```

Here I'm expecting `iss.gcount()` to return 4 as `iss >> oss.rdbuf();`, as far
as I can tell, fits under the conditions that should set the value accessed by
gcount().

As per the godbolt link, it instead returns 0.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-24 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24 21:04 [Bug libstdc++/111145] New: istream::operator>>(streambuf*) does not set gcount admin at computerquip dot com

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