ptx/C++ V5.2.6 Release Notes

ptx®/C++ V5.2.6 is a maintenance release of the DYNIX/ptx® port of the EPC C++ V5.2 compiler from Edinburgh Portable Compilers. This product also includes the Rogue Wave® Tools.h++® V7 and V8 Class Libraries and C++ Standard Library. ptx/C++ V5.2.6 runs on DYNIX/ptx V4.4.10. Read these release notes before you install or run this release of ptx/C++.


Changes in ptx/C++ V5.2.6

ptx/C++ V5.2.6 contains the following changes since ptx/C++ V5.2.5:


Changes in ptx/C++ V5.2.5

ptx/C++ V5.2.5 contains the following changes since ptx/C++ V5.2.3:


Software Compatibility


Differences Between EPC C++ V5.2 and ptx/C++ V5.2

The following list describes the differences between EPC C++ V5.2 from Edinburgh Portable Compilers, and ptx/C++ V5.2:


Differences Between ptx/C++ V5.2.x and ptx/C++ V2.1.3

This section contains information about the differences between ptx/C++ V5.2.x and ptx/C++ V2.1.3. Additional information is provided in the section "Migrating to ANSI/ISO C++" in the ptx/C++ User's Information.


Compatibility Across Versions of ptx/C++ and DYNIX/ptx

The following list describes compatibility information and issues when running different versions of ptx/C++ across different versions of DYNIX/ptx:

  1. ANSI and cfront modes are not compatible.

  2. ANSI mode for ptx/C++ V5.2 is not compatible with ANSI mode for ptx/C++ V5.0.

  3. Compiling object files with one version of ptx/C++ and linking those object files with an earlier version of ptx/C++ is not supported. For example, compiling with ptx/C++ V5.2 and linking with ptx/C++ V5.0 is not supported.

  4. Compiling object files on one version of DYNIX/ptx and linking those object files when running on an earlier version of DYNIX/ptx is not supported. For example, compiling on DYNIX/ptx V4.6 and linking when running on DYNIX/ptx V4.5 is not supported.

  5. Compiling object files on DYNIX/ptx V4.4 for use with ANSI libraries and linking those object files when running on a version of DYNIX/ptx that supports threads (DYNIX/ptx V4.5 and V4.6) is not supported.


Install ptx/C++

ptx/C++ is installed on DYNIX/ptx using the standard ptx/INSTALL procedure. ptx/C++ requires a license key for installation. For installation instructions, refer to the DYNIX/ptx V4.4.10 and Layered Products Software Installation Release Notes.


ATTENTION

The ptx/C++ shared libraries are in a separately installed product called ptx/C++ Runtime V5.2.6. For this reason, development environments require both ptx/C++ and ptx/C++ Runtime. A license is not required to install ptx/C++ Runtime.

Also, the edb debugger is installed as part of the DYNIX/ptx operating system. Release note information for edb is included in the DYNIX/ptx V4.4.10 Release Notes.



Floating Point Precision Affects C++ long long Calculations

The System V Application Binary Interface (ABI), Intel386 Architecture Processor Supplement, states that 64-bit floating point precision is the default state required for conformance to the ANSI C standard and to the IEEE 754 Floating-point standard. Furthermore, many floating-point routines may produce undefined behavior if the precision control is set to less than 53 bits. For these reasons, the c++ compiler in ptx/C++ assumes that floating-point precision is 64 bits.

If an application changes the floating point precision to 53 bits, this can cause C++ long long calculations to get the wrong results, since some of these calculations are done using floating point registers. In this scenario, the application must change the floating point precision back to 64 bits before doing long long arithmetic.


Product Documentation

The following documentation is available only at http://webdocs.numaq.ibm.com/. Note that older versions of these documents, which should be disregarded, are distributed on the HTML documentation CD provided with DYNIX/ptx V4.4.10.

ptx/C++ User's Information
edb User's Reference

Library Documentation

The Rogue Wave class library Tools.h++ is incorporated as an integral part of the ptx/C++ language implementation by permission of Rogue Wave Software Inc. The Tools.h++ Version 8 documentation is included in the /opt/ptxC++/doc directory as two online manuals in HTML format:

Tools.h++ Version 8 is available for use with ANSI compilation. Tools.h++ Version 7 is available for use with cfront compilation. The documentation for Version 7 is available in hard copy format.


ATTENTION

There is no shared library version of RogueWave Tools.h++ Version 8.


The Standard C++ Library is also part of ptx/C++ and is implemented by Rogue Wave Software Inc. Documentation for this library is included in the /opt/ptxC++/doc directory in HTML format:


Fixed Problems in ptx/C++ V5.2.6

The following list contains the problems fixed in ptx/C++ V5.2.6. The first number shown in bold font is the SPTS problem report number. The second number shown in brackets is the EPC problem report number.

246169 [3739]
Some integer to float conversions resulted in data type double.
247205 [3876]
Addition of unsigned long long variable and a function returning a pointer to a float variable resulted in an invalid value.
247479 [3913]
Debug information was not generated correctly when a function returned a structure.
252284 [4818]
c++internal signal trap error was seen when using a complicated switch statement.
253077 [4930]
The c++compiler did not record the debug information when a variable was declared as volatile.
253078 [4931]
Using c++ -g incorrectly optimized away variables declared as const.
253079 [4932]
Using c++ -g incorrectly optimized away unused variables.
253623 [5061]
Extraneous code was generated for placement delete member function, which could result in incorrect program.
254656 [NA]
The getline function on an input stream did not return when the first delimiter or EOF was reached.
255319 [6610]
The c++(1) man page did not correctly explain the differences between -EE output and -E output.
255571 [5045]
The -l option did not use the library designated by the environment variable LD_LIBRARY_PATH.

Fixed Problems in ptx/C++ V5.2.5

The following list contains the problems fixed in ptx/C++ V5.2.5. The first number shown in bold font is the SPTS problem report number. The second number shown in brackets is the EPC problem report number.

249652 [4259]
The Tools.h++ class RWTime had problems if used in a shared object; it could cause times to be shown in GMT instead of the local time zone. This problem was previously fixed in Fastpatch 252157 against ptx./C++ V5.2.3.
251062 [4537]
ptx/C++ documentation did not clearly explain that a C++ constructor for a global class object could be called multiple times in the following circumstances: if the object was defined in multiple shared objects, or when the object was defined in the executable and in one or more shared objects. For details, refer to the ptx/C++ User's Information, locate the topic "Using ptx/C++," and read the subsection "Building Shared Libraries."
251242 [4583]
The -volatile option to c++ did not cause the compiler to treat all variables as volatile.
251540 [4659]
The Tools.h++ classes RW*Hash*Iterator had incorrect default template parameters. This caused the use of any of these classes with default template parameters to fail to compile.
251541 [4660]
The definition of Tools.h++ class RWWString declared a friend function strXForm, but there was no definition of that function. This caused a link-time failure for references to that function.

The underlying support for that function is not available in DYNIX/ptx, so the declaration was removed, which will cause modules that attempt to use it to fail at compile time rather then link time. The man page for RWWString now documents that the function is not available.

251838 [4710]
The compiler's exception handling support caused stack corruption for a throw from a function that called a function that returned a class. This problem was previously fixed in Fastpatch 252157 against ptx/C++ V5.2.3.
251853 [4720]
The Tools.h++ function strXForm(const RWCSTring &) contained a recursive call that caused a program that called that function to loop until it ran out of memory.
251953 [4724]
The compiler's exception handling support performed incorrect cleanup for some nested try/catch blocks, which caused a program to fail at run-time. This problem was previously fixed in Fastpatch 252157 against ptx/C++ V5.2.3.
251954 [4736]
The compiler's exception handling support caused a constructor to be called more than once after the throw of an object of a derived class. This problem was previously fixed in Fastpatch 252157 against ptx/C++ V5.2.3.
251972 [4743]
The compiler's exception handling support caused a thrown object of a derived class to not be destroyed. This problem was previously fixed in Fastpatch 252157 against ptx/C++ V5.2.3.
252094 [4763]
The compiler's exception handling support caused a runtime abort in the library function __ex_free() for code that was compiled with the -O1 or -O option to c++.
252095 [4764]
The compiler's exception handling support inserted an extra call to a destructor in the function that was called between the function that performed a throw and the function that did the catch. This problem only occurred when the function was compiled with the -O3 or -O option to c++.
252123 [4774]
The compiler's exception handling support failed to generate a call to the destructor for the base class of a thrown object of a derived class.
252157 [4789]
The C++ compiler optimizer ignored the volatile specifier from the definition of a variable that was a pointer to volatile when that pointer was dereferenced in the test for a while loop. This problem was previously fixed in Fastpatch 252157 against ptx/C++ V5.2.3.
252520 [4894]
Use of the -Kthread option to c++ when including the header file <cerrno> caused a failure at compile-time.
252625 [4896]
The member function strstreambuf::overflow() had a bad call to memset(), which caused a runtime segmentation violation.
252713 [4956]
Some string support functions in Tools.h++ incorrectly allocated memory using new[], but then freed it using delete rather than delete[]. This caused extraneous messages from memory leak tools, but did not cause C++ applications to run incorrectly.
253427 [5014]
The list of files in the FILE section of the c++ man page was incorrect.
253452 [5012]
The constructor for the class ostrstream wrote one byte past the end of the buffer. This could cause a segmentation violation at run-time. This problem was previously fixed in Fastpatch 253452 against ptx/C++ 5.2.2.
253546 [5037]
The c++ compiler no longer predefines the macros _TYPENAME and _EXPLICIT, which had been required for the implementation of the C++ Standard Library that was used with ptx/C++ V5.0.
253548 5038]
The default thousands separator for numbers in the "C" locale should be nothing, but the numpunct<charT> functions for char and wchar_t returned a comma.
253549 [5039]
The ios_base class was missing an empty constructor, which was needed for use with uninitialized streams.
253550 [5040]
The member function deque::erase(iterator) returned a bad value for a single-element deque.
253552 [5041]
The header file <iterator> contained code that caused a compiler warning.
253553 [5042]
Calls in the header file<alogoritm> did not fully specify the iterator category, which caused compile-time failures for the use of some member functions.
253554 [5043]
The class reverse_iterator in the header file <iterator> had some members that were inaccessible, leading to compile-time failures for valid uses of those members.

Open Problem Reports

The following list contains the open problem reports in ptx/C++. The first number shown in parentheses is the SPTS problem report number. The second number shown in brackets is the EPC problem report number.


Destructors Not Called for Global Objects with C Main Program (253383) [5013]

Destructors for global objects are not called when the main program was compiled with the C compiler rather than the C++ compiler.

Workaround. Compile the following into an object file with either cc or c++ and link it in with the program:

asm(".section .fini; call __process_needed_destructions__Fv; .previous");

This workaround depends on the current implementation of the compiler and run-time library and cannot work with a compiler other than V5.2.x.


C++ Headers Have Conflicting Definitions of mbstate_t (253998) [5195]

Due to an incorrect setting in a configuration file used by the standard C++ library in ptx/C++, this library uses a different definition of struct mbstate_t than the struct that is defined in the C header file <wchar.h>. (The C++ standard says that the type should be defined in <wchar.h>). The C++ code definition is left in namespace std and the C definition is left in the global namespace. This problem prevents compilation of C++ code that attempts to define variables with the <wchar.h> definition of mbstate_t and then pass those variables to C++ functions that take arguments of type std::mbstate_t.

Workaround. All of the C++ library functions that accept arguments of type mbstate_t* currently ignore those arguments. Therefore, if C++ needs to use data of type mbstate_t for use with C libraries, use mbstate_t rather than std::mbstate_t.