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

  • HP/DDE Debugger User's Guide contains information on debugging C++ programs with the HP Distributed Debugging Environment on the HP 9000.

  • Getting Started with SoftBench on HP-UX 10.x contains SoftBench tutorials for C, C++, and COBOL.

  • C and C++ SoftBench User's Guide for HP-UX 10.x contains information on using C and C++ SoftBench.

  • Installing and Customizing SoftBench Products contains installation and customization information for SoftBench Products on HP-UX 9.x, HP-UX 10.x and Solaris.

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
  • 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
© 1998 Hewlett-Packard Development Company, L.P.