This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/7276: strstreambuf (charbuf,N,charbuf) doesn`t allowed to read.
- From: johnb at stl dot sarov dot ru
- To: gcc-gnats at gcc dot gnu dot org
- Date: 11 Jul 2002 13:31:12 -0000
- Subject: libstdc++/7276: strstreambuf (charbuf,N,charbuf) doesn`t allowed to read.
- Reply-to: johnb at stl dot sarov dot ru
>Number: 7276
>Category: libstdc++
>Synopsis: strstreambuf (charbuf,N,charbuf) doesn`t allowed to read.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jul 11 06:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: johnb@stl.sarov.ru
>Release: g++3.1
>Organization:
>Environment:
RH Linux release 7.2
>Description:
I use the constructor strstreambuf (buf,n,buf) for strstreambuf object, but can`t read from it. Write operations passes OK. Only after write operation buffer can be read. This impossibility of reading influence on strstream,istrstream objects which calls such constructor. See the simple testcase.
>How-To-Repeat:
Compile and run testcase attached with g++ 3.1.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="streambuf.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="streambuf.cpp"
I2luY2x1ZGUgPHN0cnN0cmVhbT4KI2luY2x1ZGUgPGlvc3RyZWFtPgoKI2RlZmluZSBJdAlzdGQ6
OmNoYXJfdHJhaXRzPGNoYXI+CgppbnQgbWFpbihpbnQsIGNoYXIgKltdKQp7CgljaGFyICpidWYg
PSBuZXcgY2hhciBbNV07CglzdGQ6OnN0cmNweSAoYnVmLCJhYmNkZWYiKTsKCglzdGQ6OnN0cnN0
cmVhbWJ1ZiBzb21lYnVmIChidWYsNSxidWYpOwoJCglpZiAoc29tZWJ1Zi5zZ2V0YygpID09IEl0
Ojp0b19pbnRfdHlwZSgnYScpKSAKCSAgIHN0ZDo6Y291dCA8PCAiUmVhZGluZyBwYXNzZWRcbiI7
CiAgICAgICAgZWxzZQoJICAgc3RkOjpjb3V0IDw8ICJSZWFkaW5nIGZhaWxlZFxuIjsKCi8qCSAg
IAoJc29tZWJ1Zi5zcHV0YygneCcpOyAKCglpZiAoc29tZWJ1Zi5zZ2V0YygpID09IEl0Ojp0b19p
bnRfdHlwZSgneCcpKSAKCSAgIHN0ZDo6Y291dCA8PCAiV3JpdGluZyBwYXNzZWQgIVxuIjsKCWVs
c2UKCSAgIHN0ZDo6Y291dCA8PCAiV3JpdGluZyBmYWlsZWQgIVxuIjsKCiovCQoKICAgZGVsZXRl
KGJ1Zik7CiAgIAogIHJldHVybiAwOwogfQoKCg==