HP C++ Version 7.1-015

HP C++ Version 7.1-015

Release Notes for OpenVMS Alpha


October 5, 2005

This document contains information about new and changed features in this version of HP C++ for OpenVMS Alpha.

Hewlett-Packard Company Palo Alto, California


© Copyright 2005 Hewlett-Packard Development Company, L.P.

Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license.

The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein.

UNIX is a registered trademark of The Open Group.

Portions of the ANSI C++ Standard Library have been implemented using source licensed from and copyrighted by Rogue Wave Software, Inc. All rights reserved.

Information pertaining to the C++ Standard Library has been edited and reprinted with permission of Rogue Wave Software, Inc. All rights reserved.

Portions copyright 1994-2005 Rogue Wave Software, Inc.

Contents

1 Introduction

This document contains the release notes for HP C++ Version 7.1-015 for OpenVMS Alpha. The HP C++ product requires OpenVMS Alpha Version 7.3-2 or higher.

The HP C++ media contains the following:

HTML files are provided for the release notes and some of the product manuals for use with a web browser. To view this documentation, point your browser to


file:/sys$common/syshlp/cxx$help/index.htm 

2 Important Compatibility Information

HP strives to maintain a high degree of compatibility between successive versions of the compiler and its run-time environment. Because, however, each new version includes enhancements and changes, you should be aware of the following whenever you upgrade:

The next sections discuss these differences.

2.1 Standard Library Differences

Any code that references the C++ Standard Library (any of the STL containers or algorithms, standard iostreams or locales) that was compiled using version V6.2 or earlier of the HP C++ compiler must be recompiled and relinked in order to be used with the code compiled with HP C++ Version 6.3 or later.

For example, if you have an object library, an object module, or a shareable image compiled with HP C++ Version 6.2, you must to recompile it (and relink in the case of a shareable image) before an application compiled with Version 6.3 or later can use it.

As stated earlier, this restriction applies only to code that references the C++ Standard Library; it does not apply to code that references the pre-standard Class Library, because the stability of that library's interface guarantees link compatibility in future releases.

Beginning with HP C++ Version 6.3, the Standard Library is guaranteed to be link-compatible in all subsequent releases.

For applications that will relink on the end-user's system, see Deploying Your Application in HP C++ User's Guide for OpenVMS Systems for information about redistributing C++ Run-Time Library components.

2.2 Compiler Differences

Starting with Version 6.0, the HP C++ compiler differs significantly from previous versions. There are several major differences that you should be aware of before using a Version 6.n or higher compiler for the first time. These differences are summarized here. For more detailed information, see Appendix E Compiler Compatibility in HP C++ User's Guide for OpenVMS Systems .

2.3 Differences Between HP C++ and the C++ International Standard

The following items, specified in the C++ International Standard, are not supported in Version 7.1-015 but may be supported in a future version. Details about each item are provided in the indicated sections of the C++ International Standard document and The C++ Programming Language, 3rd Edition by Bjarne Stroustrup.

2.4 Retirement of CFRONT Language Dialect

The CFRONT dialect was provided for migrating code from the CFRONT compilers to the HP C++ compiler. Because it has been over five years since the last CFRONT compiler was released, we are retiring this dialect. It is removed from Version 7.1 of the compiler.

3 New Debugger

A new OpenVMS Debugger (kit ADX072, dated 4-Mar-1999) is provided with this kit and must be installed to debug programs compiled with the compiler in this release. This debugger solves several problems with the previous debugger.

Note

The version of the OpenVMS Alpha operating system running on your computer determines how the ADX072 kit links debugger images when you run VMSINSTAL. When linked with Version 6.n, the ADX072 debugger does not work correctly on Version 7.n systems. For example, if you install ADX072 on a Version 6.2 system, and if you later upgrade that system to Version 7.2, the ADX072 debugger does not work correctly until you reinstall ADX072.

OpenVMS Alpha releases after Version 6.2 include a debugger that supports the new C++ capabilities. If you are running OpenVMS Alpha Version 6.2 or later, consult the OpenVMS New Features Manual to determine whether you must install the debugger shipped with HP C++.

To install the special C++ debugger, invoke VMSINSTAL:


@SYS$UPDATE:VMSINSTAL ADX072 device-name option-list 

See the HP C++ Installation Guide for OpenVMS Alpha for additional information.

The C++ debugger GUI image is not installed automatically on OpenVMS systems that are not running DECwindows Motif or that run a version earlier than 1.2-4.

If you decide to install Motif or upgrade to Version 1.2-4 or later, and if you then want to use the debugger GUI, you must perform these tasks:

  1. Reinstall the ADX072 kit to create the debugger's GUI image
  2. Execute a command procedure to install the debugger images and define the default system debugger

Follow these steps:

If you want the special C++ debugger to be the default debugger for the system:

  1. Invoke the command procedure as follows:


    @SYS$STARTUP:DEBUG$STARTUP_V72X.COM V72X 
    

  2. Add this line to the system startup procedure:


    $ @SYS$STARTUP:DEBUG$STARTUP_V72X.COM V72X 
    

  3. On OpenVMS systems prior to Version 6.2A, copy the resource file:


    $ COPY DECW$SYSTEM_DEFAULTS:CXXVMSDEBUG.DAT - 
           DECW$SYSTEM_DEFAULTS:VMSDEBUG.DAT 
    

Note that C++ Version 6.n and higher does not run on any OpenVMS versions prior to Version 6.2.

If you do not want the special C++ debugger to be the default debugger for the system:

  1. Invoke the command procedure as follows:


    @SYS$STARTUP:DEBUG$STARTUP_V72X.COM VMS 
    

  2. Add this line to the system startup procedure:


    $ @SYS$STARTUP:DEBUG$STARTUP_V72X.COM VMS 
    

4 C++ Standard Library

This Standard Library string class, known as the String Library, is not the same as the String Package, which is part of the Class Library implemented in earlier versions of HP C++.

For information about the HP C++ Class Library, See Appendix D in in HP C++ User's Guide for OpenVMS Systems .

Thread Safety

The Standard Library provided with this release is thread safe but not thread reentrant. Thread safe means that all library internal and global data is protected from simultaneous access by multiple threads. In this way, internal buffers as well as global data like cin and cout are protected during each individual library operation. Users, however, are responsible for protecting their own objects.

According to the C++ standard, results of recursive initialization are undefined. To guarantee thread safety, the compiler inserts code to implement a spinlock if another thread is initializing local static data. If recursive initialization occurs, the code deadlocks even if threads are not used.

5 Release Notes for the V7.1 C++ Compiler

The following sections describe enhancements, changes, and restrictions for the C++ compiler environment.

5.1 Enhancements, Changes, and Problems Corrected in Version 7.1

5.2 Restrictions in Version 7.1

6 Release Notes for the V7.1 C++ Standard Library

The following sections describe enhancements, changes, and restrictions for the C++ Standard Library.

6.1 Enhancements, Changes, and Problems Corrected in Version 7.1

6.2 The C++ Standard Library in the Form of a Shareable Image

Starting with C++ Version 7.1, the compiler kit provides linker options files and a CXXL$BUILD_SHARED_LIBCXXSTD_IMAGES.COM DCL procedure for building the following shareable images:

Notice that the filenames of the shareable images are the same as the filenames of their OLB counterparts in SYS$LIBRARY.

6.2.1 How To Create Shareable Images

The compiler installation procedure places CXXL$BUILD_SHARED_LIBCXXSTD_IMAGES.COM into the SYS$SYSTEM directory and places the linker options files into SYS$LIBRARY. The filenames of the options files are the same as the filenames of the images they create, but with a CXXL$ prefix. For example, the options file for the model ARM preinstantiation library image LIBCXXSTD.EXE is CXXL$LIBCXXSTD.OPT. The compiler installation procedure does not invoke CXXL$BUILD_SHARED_LIBCXXSTD_IMAGES.COM.

To build shareable images, invoke CXXL$BUILD_SHARED_LIBCXXSTD_IMAGES.COM as follows:

@SYS$SYSTEM:CXXL$BUILD_SHARED_LIBCXXSTD_IMAGES.COM

The procedure creates four shareable images from their respective OLB counterparts. It accesses the OLB libraries using the SYS$LIBRARY logical name and places the images into the same directory on the SYS$LIBRARY search list where the OLB libraries are located. The procedure does not insert images into IMAGELIB.OLB.

6.2.2 Linking Against the C++ Standard Library Shareable Image

There are two ways of using the C++ Standard Library in the form of a shareable image: with and without inserting the library image into SYS$LIBRARY:IMAGELIB.OLB.

Note that the following procedures are the same for object models ANSI and ARM, and for linking against the preinstantiation and noinstantiation libraries. Only name of the C++ Standard Library image is different.

When linking against the OLB library, the CXXLINK utility automatically chooses the library based on the /MODEL and /NOPREINST qualifiers, so that the selection of OLB library is transparent. When linking against the shared C++ Standard Library, you must specify the correct Standard Library image yourself.

The following examples use the model ARM preinstantiation library LIBCXXSTD.EXE. This is the default library; it is used when a program is compiled without any /MODEL qualifier and without the __FORCE_INSTANTATIONS macro defined.

6.2.2.1 Linking Without the C++ Standard Library Image in IMAGELIB.OLB

The following example shows how to link without the C++ Standard Library image in IMAGELIB.OLB:


cxx foo.cxx 
cxxl foo.obj, sys$input:/opt 
LIBCXXSTD.EXE/share 
^Z 
define LIBCXXSTD disk:[directory]LIBCXXSTD.EXE; 
run foo 

6.2.2.2 Linking With the C++ Standard Library Image in IMAGELIB.OLB

This is probably the most convenient way of linking against shared C++ Standard Library. However, there are several restrictions:

So inserting a C++ Standard Library image into IMAGELIB.OLB is suitable for a site where only a single object model is used and where linking is consistently done against either preinstantiation or noinstantiation library.

In order to link against the C++ library shareable image in IMAGELIB.OLB, create an empty LIBCXXSTD*.OLB library and make CXXLINK use it instead of the OLB library in SYS$LIBRARY. You can do this by defining a logical name CXX$LINK_LIBCXXSTD_DIR pointing to the location where the empty OLB library resides. For example, for the model ARM preinstantiation library:


libr/create disk:[directory]LIBCXXSTD.OLB 
define CXX$LINK_LIBCXXSTD_DIR disk:[directory] 

Note that while the name of the logical remains the same, the name of the OLB library it points to depends on the object model and the preinstantiation/noinstantiation library. For example, for model ANSI it would be LIBCXXSTD_MA.OLB; for the model ARM noinstantiation library, it would be LIBCXXSTD_NOINST.OLB, and so on.

With the C++ library shareable image in IMAGELIB.OLB, you can link against it without having to explicitly specify it on the CXXLINK command. For example:


cxx foo.cxx 
cxxl foo.obj 
run foo 

6.2.3 Restrictions

6.2.3.1 Overriding Global Operators new and delete

As the C++ User's Guide indicates, programs overriding global new and delete must be linked /NOSYSSHARE. Such programs will have to continue linking /NOSYSSHARE against the OLB libraries.

6.2.3.2 Mixing OLB and Shared C++ Library in the Same Process

Mixing dynamically loaded libraries linked against OLB and the shared C++ Standard Library in the same process is not supported. Also, a main executable must be linked against the same flavor (either .OLB or .EXE) of the C++ Standard Library against which the libraries it dynamically loads are linked. Violating this restriction can result in unpredictable behavior.

6.3 Restrictions

This section describes problems you might encounter when using the current release of the C++ Standard Library with the HP C++ compiler. Where appropriate, workarounds are suggested.

6.3.1 Using the C++ Libraries in Microsoft Standard Mode

When compiled /STANDARD=MS, the following restrictions apply:

7 Release Notes for the V6.5 C++ Compiler

The following sections describe enhancements, changes, and restrictions for the C++ compiler environment.

7.1 Enhancements, Changes, and Problems Corrected in 6.6-???

7.2 Enhancements, Changes, and Problems Corrected in 6.5-042

7.3 Enhancements, Changes, and Problems Corrected in V6.5-041

7.4 Enhancements, Changes, and Problems Corrected in V6.5-040

7.5 Enhancements, Changes, and Problems Corrected in V6.5-039

7.6 Enhancements, Changes, and Problems Corrected in V6.5-038

7.7 Enhancements, Changes, and Problems Corrected in V6.5-036

7.8 Enhancements, Changes, and Problems Corrected in V6.5-035

7.9 Enhancements, Changes, and Problems Corrected in V6.5-034

7.10 Enhancements, Changes, and Problems Corrected in V6.5-033

7.11 Enhancements, Changes, and Problems Corrected in V6.5-032

7.12 Enhancements, Changes, and Problems Corrected in V6.5-031

7.13 Enhancements, Changes, and Problems Corrected in V6.5-030

7.14 Enhancements, Changes, and Problems Corrected in V6.5-029

7.15 Enhancements, Changes, and Problems Corrected in V6.5-028

7.16 Enhancements, Changes, and Problems Corrected in V6.5-026

7.17 Enhancements, Changes, and Problems Corrected in V6.5-024

7.18 Enhancements, Changes, and Problems Corrected in V6.5-021

7.19 Enhancements, Changes, and Problems Corrected in V6.5-020

7.20 Enhancements, Changes, and Problems Corrected in Version 6.5

7.21 Restrictions and Known Problems in Version 6.5

8 Release Notes for the V6.3 C++ Compiler

8.1 Enhancements, Changes, and Problems Corrected in Version 6.3

8.2 Restrictions and Known Problems in Version 6.3

If you compile and link with /MODEL=ANSI and then try to use the VMS debugger to access members of a virtual base class, you might see this error:


%DEBUG-E-INTERR, debugger error in DBG$GET_BASE_CLASS_OFFSET: can't find __bptr 
or session corruption 

The error is displayed because the debugger has not yet been updated to understand the new internals of the ANSI object model.

9 Release Notes for the V6.2 C++ Compiler

9.1 Enhancements, Changes, and Problems Corrected in Version 6.2A

Enhancements, changes, and problems corrected are as follows:

9.2 Enhancements and Changes in Version 6.2

This release solves several problems in earlier versions of the compiler and includes an updated OpenVMS debugger (dated 4-Mar-1999) that solves problems with the previous debugger.

Enhancements and changes are as follows:

9.3 Restrictions in Version 6.2

This section describes problems you might encounter when using the current release of the C++ Standard Library with the HP C++ compiler. Where appropriate, workarounds are suggested.

10 Release Notes for the V6.0 C++ Compiler

10.1 Enhancements, Changes, and Restrictions in Version 6.0

This section briefly summarizes changes, enhancements, and restrictions made in Version 6.0, including problems fixed.

The C++ Standard Library provided with this release defines a complete specification (with some differences as described in Section 2.3) of the C++ International Standard. The Standard Library in this release includes for the first time the ANSI locale and iostream libraries.

Tutorial programs illustrating functionality found in the standard C++ library including the locale , iostream , and STL classes shipped with this release can be found in:


     SYS$SYSROOT:[SYSHLP.EXAMPLES.CXX]*.CXX 

You can compile and run these programs and use them as models for your own coding. The expected output for each program can be found in:


     SYS$SYSROOT:[SYSHLP.EXAMPLES.CXX]*.RES 

Version 6.0 introduces the following major enhancements and changes. For detailed information about the HP C++ Standard Library, refer to HP C++ User's Guide for OpenVMS Systems.

Additional changes include the following:

Contents