Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP aC++ Version A.03.25 Release Notes: HP Series 9000 > Chapter 3 Related Documentation

Other Documentation

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

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).

  • Parallel Programming Guide for HP-UX Systems (B6056-90006) describes efficient parallel programming techniques available for the
    HP Fortran 90, HP C, and HP aC++ compilers on HP-UX.

    This document is available on the HP-UX 11.0 CD-ROM and on the World Wide Web at the following URL:

    http://docs.hp.com/hpux/development/

    To order a paper copy, contact Hewlett-Packard's Support Materials Organization (SMO) at 1-800-227-8164 and provide the above part number.

HP aC++ World Wide Web Homepage

The HP aC++ World Wide Web Homepage provides the latest information regarding:

  • Frequently Asked Questions

  • Release Version and Patch Table

  • Purchase and Support Information

  • Documentation Links (including Release Notes and Programming Guides)

  • Compatibility between Releases

Access the Homepage at the following URL:

http://www.hp.com/go/c++

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 release of HP aC++ A.01.07, 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://www.hp.com/go/c++

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 libcl.sl 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 raise 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 function 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));
}

Content of .o Files may Change

The following applies when you use an aCC command-line option that invokes the assigner.

The content of a given .o file can potentially change when it is used in a closure (with the +inst_close option) or link operation. The change may occur in either of the following cases:

  • You change the order of .o file's on the link line. For example, if you compile and link A.c and B.c multiple times as follows, the contents of A.o and B.o may not be the same following the second link as they were following the first link:

    aCC -c A.c B.c
    aCC A.o B.o

    aCC -c A.c B.c
    aCC B.o A.o

    o You link a .o file with different objects. In the following example, the content of A.o may not be the same following the second link as it was following the first link:

    aCC A.o B.o

    aCC A.o C.o

The Named Return Value (NRV) Optimization

Syntax:   -Wc,-nrv_optimization,[off|on]

The above syntax disables (default) or enables the named return value (NRV) optimization. For this optimization to work correctly in conjunction with exception handling, the application must be linked to an aC++ run-time support library that comes with HP aC++ A.01.04 or a subsequent version. Linking with a prior library may cause spurious failures. If the shared version of this library is selected (default), the platform on which the application is run must also have that release of the HP aC++ run-time support library (libCsup.sl).

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++ working paper, 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:

  • Linking PA-RISC 2.0 object files on any system — PA-RISC 1.0 programs will run on 1.1 and 2.0 systems. PA-RISC 2.0 programs will not run on 1.1 or 1.0 systems.

  • Dynamic linking with -A — If you do dynamic linking with -A, you should migrate to using the Shared Library Management Routines. These routines are also described in the sh_load(3X) man page.

  • Procedure call parameter and return type checking (which can be specified with -C) — The current linker checks the number of symbols, parameters, and procedure calls across object files. In a future release, you should expect HP compilers to perform cross-module type checking, instead of the linker. This impacts HP Pascal and HP Fortran programs.

  • Duplicate names found for code and data symbols — The current linker can create a program that has a code and data symbol with the same name. In a future HP-UX release, the linker will adopt a single name space for all symbols. This means that code and data symbols cannot share the same name. Renaming the conflicting symbols solves this problem.

  • Unsatisfied symbols found when linking to archive libraries — If you specify the -v option with the +vallcompatwarnings option and link to archive libraries, you may see new warnings.

  • Versioning within a shared library — If you do versioning within a shared library with the HP_SHLIB_VERSION (C and C++) or the SHLIB_VERSION (Fortran and Pascal) compiler directive, you should migrate to the industry standard and faster performing library-level versioning.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2000 Hewlett-Packard Development Company, L.P.