Skip to main content


IY73096: C++ STREAMS AFFECTED BY THE C LIBRARY SETLOCALE() FUNCTION

Fixes are available

December 2006 IBM C++ Runtime Environment Components for AIX
November 2006 IBM C++ Runtime Environment Components for AIX
February 2007 IBM C++ Runtime Environment Components for AIX
June 2006 IBM C++ Runtime Environment Components for AIX
April 2009 XL C/C++ Enterprise Edition V8.0 for AIX PTF
August 2007 XL C/C++ Enterprise Edition V8.0 for AIX PTF
May 2007 XL C/C++ Enterprise Edition V8.0 for AIX PTF
April 2006 IBM C++ Runtime Environment Components for AIX
December 2006 XL C/C++ Enterprise Edition V8.0 for AIX PTF
July 2007 XL C/C++ Enterprise Edition V8.0 for AIX PTF
July 2007 IBM C++ Runtime Environment Component for AIX
June 2006 XL C/C++ Enterprise Edition V8.0 for AIX PTF
November 2005 IBM C++ Runtime Environment Components for AIX
March 2006 XL C/C++ Enterprise Edition V8.0 for AIX PTF
May 2008 XL C/C++ Enterprise Edition V8.0 for AIX PTF
February 2008 XL C/C++ Enterprise Edition V8.0 for AIX PTF
August 2008 XL C/C++ Enterprise Edition V8.0 for AIX PTF
March 2006 IBM C++ Runtime Environment Components for AIX
November 2008 XL C/C++ Enterprise Edition V8.0 for AIX PTF
January 2006 IBM C++ Runtime Environment Components for AIX
February 2007 XL C/C++ Enterprise Edition V8.0 for AIX PTF
November 2007 XL C/C++ Enterprise Edition V8.0 for AIX PTF
August 2006 IBM C++ Runtime Environment Components for AIX
August 2006 XL C/C++ Enterprise Edition V8.0 for AIX PTF
May 2006 XL C/C++ Enterprise Edition V8.0 for AIX PTF
April 2007 VisualAge C++ Professional V6.0 for AIX PTF
April 2007 IBM C++ Runtime Environment Components for AIX
October 2006 IBM C++ Runtime Environment Components for AIX
September 2005 IBM C++ Runtime Environment Components for AIX
July 2009 XL C/C++ Enterprise Edition V8.0 for AIX PTF
October 2009 XL C/C++ Enterprise Edition V8.0 for AIX PTF

 

APAR status

  • Closed as program error.

Error description

  • The change to support multiple locales in V7 runtime had an
    impact on V6 standard library headers such that C++ streams are
    affected by the setlocale() function.
    
    The C++ standard says streams are constructed from std::locale
    [27.4.4.2p3] and std::locale is constructed from
    std::locale::global or std::locale::classic [27.1.1.2p2]
    therefore setlocale() should have no effect on C++ streams.
    
    
    Test case:
    
    #include <sstream>
    #include <locale.h>
    #include <stdio.h>
    
    int main()
    {
       setlocale( LC_ALL, "en_US" );
    
       int x = 123456;
       std::stringstream s;
    
       s << x;
       printf( "%s\n", s.str().c_str());
    }
    
    
    Actual output:
    $ xlC t.cpp && a.out
    123,456
    
    Expected output:
    $ xlC t.cpp && a.out
    123456
    

Local fix

  • N/A
    

Problem summary

  • There was a change in V7 C++ runtime library and header files
    which resulted in the observed behaviour. Specifically, the
    runtime was modified to accomodate multiple locales active at
    a given time.
    

Problem conclusion

  • Runtime libraries were modified to eliminate V6 problems without
    recompilation.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IY73096

  • Reported component name

    VA C++ PROF FOR

  • Reported component ID

    5765F5600

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2005-06-22

  • Closed date

    2005-08-21

  • Last modified date

    2007-04-30

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

    IY78923

Fix information

  • Fixed component name

    VA C++ PROF FOR

  • Fixed component ID

    5765F5600

Applicable component levels

  • R600 PSY U811610

       UP07/04/30 I 1000

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page

Please take a moment to complete this form to help us better serve you.

This material provides me with the information I need.






This material is clear and easy to understand.






Did the information help you to achieve your goal?

What updates, improvements, or related information would you like to see in this document?

Your response will be used to improve our document content. Requests for assistance, if applicable, should be submitted through your normal support channel as we cannot respond from this site.


Input the verification number to submit feedback:



Document information

Product categories:

Software

Software Development

Analysis, Modeling, Design & Construction

VisualAge C++

Compiler


Software version:

600


Reference #:

IY73096


IBM Group:

Software Group


Modified date:

2007-04-30

Translate my page