HP aC++ Version A.05.30 Release Notes

5971-2284

June 2001

Copyright 2001 Hewlett-Packard Company

Legal Notices

Copyright Hewlett-Packard Company 2001. All rights are reserved. Reproduction, adaptation, or translation without prior written permission is prohibited, except as allowed under the copyright laws.

Hewlett-Packard makes no warranty of any kind with regard to this document, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. Hewlett-Packard shall not be liable for errors contained herein nor direct, indirect, special, incidental or consequential damages in connection with the furnishing, performance, or use of this material. Information in this publication is subject to change without notice.

Corporate Offices: Hewlett-Packard Co., 3000 Hanover St., Palo Alto, CA 94304

Use, duplication or disclosure by the U.S. Government Department of Defense is subject to restrictions as set forth in paragraph (b)(3)(ii) of the Rights in Technical Data and Software clause in FAR 52.227-7013.

Rights for non-DOD U.S. Government Departments and Agencies are as set forth in FAR 52.227-19(c)(1,2).

Use of this document and flexible disc(s), compact disc(s), or tape cartridge(s) supplied for this pack is restricted to this product only.
Additional copies of the programs may be made for security and back-up purposes only. Resale of the programs in their present form or with alterations, is expressly prohibited.

A copy of the specific warranty terms applicable to your Hewlett-Packard product and replacement parts can be obtained from your local Sales and Service Office.

© Copyright 1980, 1984, 1986 AT&T Technologies, Inc. UNIX and System V are registered trademarks of AT&T in the USA and other countries. UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Limited.

PostScript is a trademark of Adobe Systems, Inc.

© Copyright 1985-1986, 1988 Massachusetts Institute of Technology.
X Window System is a trademark of the Massachusetts Institute of Technology.


Preface


This document provides the following information: Note: The software code printed in the release notes title indicates the software product version at the time of release. Some product and operating system changes do not require changes to documentation; therefore, do not expect a one-to-one correspondence between these changes and release notes updates.

Latest printing: June, 2001

This document resides online in the following locations: /opt/aCC/newconfig/RelNotes/ACXX.release.notes

To print this file, use an lp command like the following: lp -dprinter_name /opt/aCC/newconfig/RelNotes/ACXX.release.notes

Use your browser to access the HP aC++ Home Page and look at the documentation:
http://devresource.hp.com/devresource/Tools/cpp/index.html

Problem Reporting:

If you have any problems with the software or documentation, please contact your local Hewlett-Packard Sales Office or Customer Service Center.


Chapter 1: Features



This chapter summarizes the features included in this version of the HP aC++ Itanium Processor Family (IPF) compiler. The compiler supports much of the ISO/IEC 14882 Standard for the C++ Programming Language (the international standard for C++).

HP aC++ provides a variety of performance related options, in addition to the options described in these release notes.  See the "HP aC++ Online Programmer's Guide" "Performance" section for full documentation. Chapter 3 of these release notes provides access instructions to the guide.

New Features

Standard C++ Library 2.0 based on the new Rogue Wave SL 2.0

The -AA command line option enables use of the new 2.0 Standard C++ Library, which includes the new standard conforming ("templatized") iostream library.  It conforms to the ISO C++ standard.

The 2.0 library is not compatible with the version 1.2.1 Standard C++ Library previously bundled with HP aC++.  HP aC++ will continue support for standard C++ library 1.2.1 without name or location change.  Customers should not notice any change when -AA is not used.  However, the 1.2.1 library is deprecated and will be replaced by the new library eventually.

If you wish to use the new 2.0 library, you must use the -AA option consistently to compile and link all translation units. Mixing object
files within an executable is not supported.

The default is for -AA to be on with -Wc,-ansi_for_scope,off.  The new -AP option turns -AA mode off.

HP Caliper is now bundled with Hp aC++.

HP Caliper 1.0 is a new general-purpose performance analysis and performance improvement tool for Itanium-based applications bundled with HP ANSI C, HP aC++, and HP Fortran 9x.  HP Caliper helps you analyze and improve the performance of your native Itanium-based programs in three ways:

A significant advantage of HP Caliper is that it requires no special compilation, link options, or libraries for your Itanium-based programs. HP Caliper dynamically measures performance on: Another advantage is that HP Caliper performs its measurements with low overhead and for well-behaved executables, HP Caliper does not alter the semantic behavior of the target program.

Required disk space is 12 MB. Memory requirements vary with settings used for performance measurement.

Documentation

HP Caliper 1.0 includes the following documentation:

HP CXperf

CXperf is bundled with ANSI C, aC++ and Fortran Compilers.

CXperf is an interactive runtime performance analyzer for programs compiled in 32- and 64-bit mode with HP Fortran 90, ANSI C++, and ANSI C compilers.  CXperf collects data on a per-process basis for MPI and scalar applications, and a per-thread basis for pthreads and compiler-based parallelism.  Additionally, CXperf provides shared library profiling.

Required disk space is approximately 10MB Runs only on HP-UX 11.x or higher For additional information and software updates, please visit http://devresource.hp.com/devresource/Tools/cxperf/index.html
 

Migrating from HP C++ (cfront) to HP aC++

The compiler lists Errors, Future Errors and Warnings.  Expect to see more warnings, errors and future errors reported in your code, many related to standards based syntax.  For more complete information, refer to:
 
  1. "HP aC++ Transition Guide" at the following world wide web URL:
    http://devresource.hp.com/devresource/tools/cpp/index.html

  2. The "HP aC++ Online Programmer's Guide" section "Migrating from HP C++ (cfront) to HP aC++" contains a subset of the information found in the transition guide.

  3. For general background information and experience, subscribe to the cxx-dev list server (like a notes group).  Send a message to majordomo@cxx.cup.hp.com with the following command in the body of the message:  subscribe list-name


  4. Available list-names are as follows:

    cxx-dev            HP C++ Development Discussion List
    cxx-dev-announce   HP C++ Development Announcements
    cxx-dev-digest     HP C++ Development Discussion List Digest
    cxx-dev-announce is also broadcast to cxx-dev, so there is only a need to subscribe to one of the lists.  The digest also includes both cxx-dev and cxx-dev-announce.

    For additional help or information about the list server, send a message to majordomo@cxx.cup.hp.com with the following command in the body of the message:  help

    Also, search the cxx-dev archives at the following URL: http://www.devresource.hp.com/devresource/Forums/Forums.html

  5. For specific support questions, contact your HP support representative.
  6. For generic C++ questions, see documents and URL's listed in the"HP aC++ Online Programmer's Guide, Information Map."

Some migration issues are listed below:


                                  Chapter 2: Installation Information



Read this entire document and any other release notes or Readme files you may have before you begin an installation.

To install your software, run the SD-UX swinstall command.  It will invoke a user interface that will lead you through the installation.  For more information about installation procedures and related issues, refer to "Managing HP-UX Software with SD-UX" and other README, installation, and upgrade documentation provided or described in your HP-UX 11.x operating system package.

Depending on your environment, you may also need documentation for other parts of your system, such as networking, system security, and windowing.

HP aC++ requires approximately 185 MB of disk space:  approximately 100 MB for the files in /opt/aCC, 15 MB for WDB, and 56 MB for u2comp. For more precise sizes, use the command:  /usr/sbin/swlist -a size "YourProductNumber"


                                 Chapter 3: Related Documentation



Documentation for HP aC++ is described in the following sections.

Online Documentation

The following online documentation is included with the HP aC++ product:

Online C++ Example Source Files

Online C++ example source files are located in the directory, /opt/aCC/contrib/Examples/RogueWave. These include examples for the
Standard C++ Library and for the Tools.h++ Library.

Printed Documentation

"HP aC++ Release Notes" is this document.  A printed copy of the release notes is provided with the HP aC++ product.  Release notes are also provided online, as noted above.

Other Documentation

Refer to the "HP aC++ Online Programmer's Guide" Information Map for documentation listings, URL's, and course information related to the C++ language.  Also, see below.

The following documentation is available for use with HP aC++. To order printed versions of Hewlett-Packard documents, refer to manuals(5).

HP aC++ World Wide Web Homepage

Access the HP aC++ World Wide Web Homepage at the following URL:     http://devresource.hp.com/devresource/Tools/cpp/index.html

Refer to the Homepage for the latest information regarding:

Compatibility between HP aC++ Releases

Maintaining binary compatibility is a key release requirement for new versions of HP aC++. The compiler has maintained the same object model and calling convention and remains compatible with the HP-UX runtime in the code that it generates as well as its intrinsic runtime library (libCsup) across the various releases of HP aC++ and its run-time patch stream.

For the Standard Template Library (libstd) and a generic component/tool library (librwtool), HP aC++ (as well as some other C++ compilers) relies on Rogue Wave's Standard Library and Tools.h++ libraries. From the initial release of HP aC++ through the patch release of version A.01.06, Rogue Wave's Standard Library version 1.2 and Tools.h++ version 7.0.3 compatible libraries were bundled with the compiler.

At the HP aC++ A.01.07 release, the runtime libraries were updated to Rogue Wave's Standard Library version 1.2.1 and Tools.h++ version 7.0.6. These new libraries introduced additional data members in some base classes resulting in incompatibility with the previous versions.

For more details, refer to the HP aC++ World Wide Web Homepage at the following URL and choose "Compatibility between Releases:" http://devresource.hp.com/devresource/Tools/cpp/index.html

Floating-Point Exceptions Must be Raised Prior to Entering Library Routines
Programmers who use floating-point arithmetic are reminded to insure that floating-point exceptions are raised before entering a library routine. For example a floating-point divide should be followed by a floating-point store.  If you fail to do so, code within the library may raise the floating-point exception, interrupting the library code rather than the user code.

This reminder is included since the unwind component of libcl.a and libunwind.so uses floating-point operations in more places
than earlier versions of the library.  HP aC++ uses unwind functionality to support throw/catch exception handling.  Programs which don't raised floating-point exceptions before entering unwind library routines may have the exception raised from within the unwind routine.

Difference in Class Size when Compiling in 32-bit versus 64-bit Mode
The size of a class containing any virtual functions varies when compiled in 32-bit mode versus 64-bit mode.  The difference in size is caused by the virtual table pointer (a pointer to an internal compiler table) in the class object.  (The pointer is created for any class containing one or more virtual functions.)

When compiling the following example in 32-bit mode, the output is 8. In 64-bit mode, the output is 16.

        extern "C" int printf(const char *,...);
        class A {
          int a;
        public:
          virtual void foo();      //virtual function foo, part of class A
        };
        void A::foo() {
          return;
        }
        int main() {
          printf("%d\n",sizeof(A));
        }
The named return value (NRV) optimization
Syntax:   -Wc,-nrv_optimization,[off|on]
Or:       +[no}nrv

The above syntax disables (default) or enables the named return value (NRV) optimization.

The NRV optimization eliminates a copy-constructor call by allocating a local object of a function directly in the caller's context if that
object is always returned by the function. For example:

        struct A {
           A(A const&); // copy-constructor
        };
        A f(A const& x) {
           A a(x);
           return a; // Will not call the copy constructor if the
        }            // optimization is enabled.
This optimization will not be performed if the copy-constructor was not declared by the programmer. Note that although this optimization is allowed by the ISO/ANSI C++ standard, it may have noticeable side-effects.

Example:   aCC -Wc,-nrv_optimization,on app.C

Linker Compatibility Warnings
Beginning with the HP-UX 10.20 release, the linker generates compatibility warnings. These warnings include HP 9000 architecture issues, as well as linker features that may change over time.  Compatibility warnings can be turned off with the +v[no]compatwarnings linker option. Also, detailed warnings can be turned on with the +vallcompatwarnings linker option.

Link time compatibility warnings include the following:


Chapter 4: Problem Descriptions and Fixes and Known Limitations



This chapter summarizes the known problems and limitations of the current version of HP aC++ except as otherwise noted.

See the latest "HP-UX Software Status Bulletin" support document for other known problems.

Known Problems

Customers on support can use the product number to assist them in finding SSB and SRB reports for HP aC++.  The product number you can search for is B3910BA.

To verify the product number and version for your HP aC++ compiler, execute the following HP-UX commands:

Following are known problems and workarounds.

Object Files Generated at Optimization Level 4

Object files generated by the compiler at optimization level 4, called intermediate object files, are intended to be temporary files. These
object files contain an intermediate representation of the user code in a format that is designed for advanced optimizations. Hewlett-Packard reserves the right to change the format of these files without notice in any compiler release or patch.  Use of intermediate files must be limited to the compiler that created them. For the same reason, intermediate object files should not be included into archived libraries that might be used by different versions of the compiler.

When an incompatible intermediate file is detected, the compiler will issue a message and terminate.

Lack of support for Precompiled Headers

Use of Precompiled Header files and the "automatic precompiled header" (+hdr_cache) option in conjunction with Itanium (IPF) is not supported in this release.

Incompatibilities Between the Standard C++ Library Version 1.2.1 and the Draft Standard

As the ANSI C++ standard has evolved over time, the Standard C++ Library has not always kept up.  Such is the case for the "times" function object in the functional header file.  In the standard, "times" has been renamed to "multiplies."

If you want to use "multiplies" in your code, to be compatible with the ISO/ANSI C++ standard, use a conditional compilation flag on the aCC command line.  For example, for the following program, compile with the command line:

aCC -D__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL test.c
    // test.c
    int times;                   //user defined variable
    #include <functional>
    // multiplies can be used in
    int main() {}
    // end of test.c
This flag and the following flags are now automatically set with IPF:

-D_HPACC_THREAD_SAFE_RB_TREE
-D__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL
-D__HPACC_FIX_FUNC_ADAPTER_OPERATOR
-D__HPACC_FULL_ITERATOR_REL_OPS
-D__HPACC_TEMPLATE_PAIR_CTOR
-D__HPACC_MEM_FUN_ADAPTOR

Conflict between macros.h and numeric_limits Class (min and max)

If your code includes /usr/include/macros.h, note that the min and max macros defined in macros.h conflict with the min and max functions defined in the numeric_limits class of the Standard C++ Library.  The following code, for example, would generate a compiler Error 134:
   numeric_limits<unsigned int>::max();
If you must use the macros.h header, try undefining the macros that conflict:
   ...
   #include <macros.h>
   #undef max
   #undef min
   ...

Known Limitations

Some of these limitations will be removed in future releases of HP aC++. Please be aware that some of these limitations are platform-specific.