incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Created: (STDCXX-201) [Solaris 10] std::time_put produces "" for %Z
Date Tue, 13 Jun 2006 22:07:29 GMT
[Solaris 10] std::time_put produces "" for %Z
---------------------------------------------

         Key: STDCXX-201
         URL: http://issues.apache.org/jira/browse/STDCXX-201
     Project: C++ Standard Library
        Type: Bug

  Components: 22. Localization  
    Versions: 4.1.2    
 Environment: Sun C++ 5.8/Solaris 10
    Reporter: Martin Sebor
 Assigned to: Martin Sebor 


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)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message