libstdc++/7213: g++ 3.1: basic_filebuf doesn`t support open mode "a+"

johnb@stl.sarov.ru johnb@stl.sarov.ru
Fri Jul 5 02:56:00 GMT 2002


>Number:         7213
>Category:       libstdc++
>Synopsis:       g++ 3.1: basic_filebuf doesn`t support open mode "a+"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 05 01:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     johnb@stl.sarov.ru
>Release:        g++ 3.1
>Organization:
>Environment:
Red Hat Linux release 7.2, g++ 3.1, libc 2.2.4
>Description:
basic_filebuf doesn`t support the open mode "a+. See testcase.
>How-To-Repeat:
Compile testcase by g++ 3.1 and run it. For example:
$g++31 open-mode-a+.cpp -o open-mode-a+.exe
$open-mode-a+.exe
You`ll get the "Failed" message.
>Fix:
Add support of "a+" open mode. Probably this is in the file basic_file_stdio.cc
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="open-mode-a+.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="open-mode-a+.cpp"

I2luY2x1ZGUgPGZzdHJlYW0+CiNpbmNsdWRlIDxpb3N0cmVhbT4KCmludCBtYWluICgpCiB7CiAg
ICAgc3RkOjpiYXNpY19maWxlYnVmPGNoYXI+IGZidWY7CiAgICAgY2hhciB0bltdID0gIm9wZW4t
bW9kZS1hKy5jcHAiOwogICAgIGludCByZXMgPSAwOwogICAgIAogICAgIGZidWYub3Blbih0biwg
c3RkOjppb3NfYmFzZTo6aW4gfCBzdGQ6Omlvc19iYXNlOjpvdXQgfCBzdGQ6Omlvc19iYXNlOjph
cHApOwoKICAgICBpZiAoZmJ1Zi5pc19vcGVuKCkpCiAgICAgICBzdGQ6OmNvdXQgPDwgIlBhc3Nl
ZFxuIjsKICAgICBlbHNlIHsKICAgICAgIHJlcyA9IDE7CiAgICAgICBzdGQ6OmNvdXQgPDwgIkZh
aWxlZFxuIjsKICAgICB9CiAgICAgCiAgcmV0dXJuIHJlczsKIH0K



More information about the Gcc-bugs mailing list