Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
4.1.2
-
None
-
None
-
Sun C++ 5.8/Solaris 10
Description
The program below runs fine on Solaris 9 but aborts on Solaris 10.
$ cat t.cpp && nice gmake t && uname -sr && TZ=foobar ./t
#include <cassert>
#include <cstring>
#include <ctime>
#include <sstream>
#include <locale>
int main ()
{
const std::locale loc;
typedef std::time_put<char> TimePut;
const TimePut &tp = std::use_facet<TimePut>(loc);
std::ostringstream strm;
const std::tm tmb = std::tm ();
tp.put (std::ostreambuf_iterator<char>(strm), strm, ' ', &tmb, 'Z');
assert ("foobar" == strm.str ());
}
CC -c -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG -I/amd/devco/sebor/dev/stdlib/include -I/build/sebor/sunpro-5.8.j1-15S/include -I/amd/devco/sebor/dev/stdlib/examples/include -library=%none -g -xarch=v9 +w t.cpp
"/amd/devco/sebor/dev/stdlib/include/sstream", line 346: Warning: std::ostringstream::rdbuf hides the function std::ios::rdbuf(std::streambuf *).
"t.cpp", line 14: Where: While specializing "std::ostringstream ".
"t.cpp", line 14: Where: Specialized in non-template code.
1 Warning(s) detected.
CC t.o -o t -library=%none -L/build/sebor/sunpro-5.8.j1-15S/lib -mt -xarch=v9 -L/build/sebor/sunpro-5.8.j1-15S/lib -lstd15S -lm
SunOS 5.10
Assertion failed: "foobar" == strm.str (), file t.cpp, line 19
Abort (core dumped)