This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libstdc++/3599: Overloading streambuf for ostream doesn't appear to work



>Number:         3599
>Category:       libstdc++
>Synopsis:       Overloading streambuf for ostream doesn't appear to work
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 06 15:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Roman Sulzhyk
>Release:        GCC-3.0
>Organization:
>Environment:
Linux RH 7.1
>Description:
I was overloading streambuf's in custom made streams, and 
noticed that it stopped working as expected in GCC 3.0. I 
cut it down to the smallest example which doesn't work, but
couldn't find where exactly is bad bit set - having trouble
drilling through with gdb 5.0.

I will try to look further into it, but here's an example program.
The second line never gets output. Maybe I'm using streambuf 
wrong, but the example works fine on windoze and gcc 2.96

Thanks,

Roman
>How-To-Repeat:
Just compile and run the executable.
>Fix:
No fix from me.
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="newcrap.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="newcrap.cpp"

I2luY2x1ZGUgPGlvc3RyZWFtPgojaWYgZGVmaW5lZChfX0dOVUNfXykgJiYgKF9fR05VQ19fID49
IDMpCiNpbmNsdWRlIDxzdHJlYW1idWY+CiNlbHNlIAojaW5jbHVkZSA8c3RyZWFtYnVmLmg+CiNl
bmRpZgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmNsYXNzIGNyYXBJT2J1ZmZlcjogdmlydHVhbCBw
dWJsaWMgc3RyZWFtYnVmIHsKcHJvdGVjdGVkOgogICB2aXJ0dWFsIGludF90eXBlIG92ZXJmbG93
ICggaW50IGMgKSB7IAogICAgIGNvdXQgPDwgKGNoYXIpIGM7IAogICAgIHJldHVybiAwOwogICB9
CnB1YmxpYzoKICAgY3JhcElPYnVmZmVyKCkgOiBzdHJlYW1idWYoKSAJe30KfTsKCmludCBtYWlu
ICggaW50IGFyZ2MsIGNoYXIgKiphcmd2ICkKewogICBvc3RyZWFtIGNyYXAoJmIpOwoKICAgY3Jh
cCA8PCAiSGVsbG8iIDw8IGVuZGw7CgogICAvLyBOZXZlciBzaG93cyB1cCB1c2luZyBHQ0MgMy4w
IC0gY3JhcCBnZXRzIGludG8gYSBiYWRiaXQgc3RhdGUsCiAgIC8vIGFuZCBJIGhhdmUgdHJvdWJs
ZSB0cmFjaW5nIHdoZXJlIGl0IGhhcHBlbnMuLi4KICAgY3JhcCA8PCAiSGkgdGhlcmUiIDw8IGVu
ZGw7CgogICByZXR1cm4gMDsKfQo=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]