#include <streambuf>
struct Dummy_T : public std::basic_streambuf<char> {
Dummy_T(char * buf) {
basic_streambuf<char>::setg(buf,buf,buf);
}
};
int main() {
char buf[1024];
Dummy_T dummy(buf);
}
The above codeseg fault using the following command:
CC streambuf.cc -mt -xarch=v8plusa -library=stlport4
Changing xarch to v9 (64-bit) would eliminate the problem.
Here is output from CC -V
CC: Sun C++ 5.5 Patch 113817-10 2004/10/05
Another CC(Sun C++ 5.6 2004/07/15) fails to link.
Here is the output from 'uname -a':
SunOS pax 5.8 Generic_108528-27 sun4u sparc SUNW,Ultra-Enterprise