From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4C993858C53; Thu, 24 Aug 2023 21:04:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4C993858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1692911071; bh=ch5hbZLnuWys1wToSuTz+qmqmBHQwyzd5exfAUgJ0dE=; h=From:To:Subject:Date:From; b=ldIaCXT8UuI0pFQNkuBww00nKpxD0LXB8sho7Gemq/1WvzoHigfumyYENAhBWfomt Rxj+t1Kv0185HME9tnJhwkGezeX/VdsEREfBKHlpr/Gzi0ALijPYJvssG4ZYI/12nA 5EW+Y/oOXEux45Mb90HLmxmlGa8Ymh9H7aZP3eIE= From: "admin at computerquip dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/111145] New: istream::operator>>(streambuf*) does not set gcount Date: Thu, 24 Aug 2023 21:04:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: admin at computerquip dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111145 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 #include 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.=