vector/algorithm breaks iostream?

Benjamin Kosnik
Tue Jun 1 12:43:00 GMT 1999

> I checked that out and the problem is still present.  Tried stepping through
> things (finally have DDD hooked up to gdb (oh, it's very nice)) just now; it

Odd. Can you look at


and see if there is an __ioinit object in it? If so, your sources are not up to

It's working for me on x86/linux and sparc/solaris2.5.1, with a fresh checkout
from CVS.

> seems that the streambuf's _M_{in,out}_* members are never being set to
> anything, so a lot of the tests (e.g., on _M_out_cur) always fail, and so
> things just don't get done.  The __ioinit count gets up to 6, but I think
> some

Right. You can just do this in gdb:

file a.out
break main
print *__ioinit._M_cerr._M_file

and look at _fileno: it should not be -1. If it is, then things are not
initialized properly.

Could your include paths be mixed up? Or are you taking headers from an old
install directory? Try building, then do a "make check" in your build
directory. After that's built up all the exe's, try running You should get something like this:

testing cout
testing cerr
testing clog


More information about the Libstdc++ mailing list