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.27 Release Notes: HP Series 9000 > Chapter 1 Features

New and Changed Features

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

New features in HP aC++ version A.03.27 are listed below. They apply to the HP-UX 11.x and operating systems.

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 (unless otherwise noted below) . Chapter 3 of these release notes provides access instructions to the guide.

Highlights

  • Rogue Wave Standard C++ Library 2.2.1

  • Common Migration Problem when using the -AA Option

  • Transitioning from the Prior to the New Standard C++ Library

  • Online Documentation for Standard C++ Library 2.2.1

  • man Pages for Standard C++ Library 2.2.1

  • Incremental Linking in 64-bit Mode

  • Linker Patch Requirements for 11.x and 11i

More Details

  • The Rogue Wave Standard C++ Library 2.2.1 (libstd_v2) is now bundled with HP aC++. This library includes the standard iostream library and has namespace std enabled.

    To use the new library, you must specify the -AA command line option. Note, the following:

    • The +A option is not a supported with -AA and may give various link or run-time errors.

    • The Rogue Wave Tools.h++ Version 7.0.6 library cannot be used with -AA.

    • The prior library (Rogue Wave Standard C++ Library 1.2.1) is the default.

    • The The prior libraries (Rogue Wave Standard C++ Library 1.2.1 and Rogue Wave Tools.h++ Version 7.0.6) are not compatible with the 2.2.1 library. Code compiled without -AA is incompatible with code compiled with -AA.

  • The following example shows a common problem when using the -AA option. The result of using the new overloads of strchr (on a const char*) is now a const char*. And Error 440 results if "p" is not declared as a const char*.

    #include <string.h>
    int main() {
    char *p = strchr("abc", 'c');
    }
    $ aCC -c strchr.c
    $ aCC -c strchr.c -AA
    Error 440: "strchr.c", line 3 # Cannot initialize 'char *' with
    'const char *'. char *p = strchr("abc", 'c');
    ^^^^^^^^^^^^^^^^^^
  • Transitioning from the Prior to the New Standard C++ Library

    • Source Code Changes

      Since the new Standard C++ Library (libstd_v2) includes the new iostream library and has namespace std enabled, significant changes may be required in your source code. For example, the following program will no longer compile:

      #include <iostream>     // ported from <iostream.h>
      int main() {
      cout << "Hello, World" << endl;
      }

      Because both cout and endl are now in namespace std, they must be referenced as std::cout and std::endl. Alternatively, using declarations or using directives can be added to your code to make them visible outside of the namespace std scope. The following is correct:

      #include <iostream>     
      int main() {
      std::cout << "Hello, World" << std::endl;
      }
    • iostream_compat Directory

      To help with code transition to the new C++ standard, an iostream_compat directory is provided. It contains some header files that are just wrappers. You can include files in the iostream_compat directory even when specifying the -AA option, to make symbols like cout visible in global scope.

      For example, <iostream.h> is in iostream_compat, and it includes the new <iostream> header followed by a using directive (using namespace std). So the following program will also compile, with warning 890:

      #include <iostream>     
      int main() {
      cout << "Hello, World" << endl;
      }

      To turn off the warning, specify the +W890 command line option.

      NOTE: In general, you are encouraged to use header names as specified in the C++ standard. We do not guarantee the inclusion of non-standard compliant headers in our future releases.

      See the C++ international standard for detailed language rules

    • Threads

      As with prior compiler releases, one version of libstd_v2 is provided for use with both threaded and non-threaded code. To compile threaded applications, macro -D_RWSTD_MULTI_THREAD must be used. -D_THREAD_SAFE is no longer needed.

      Refer to the HP aC++ Online Programmer's Guide section on Threads for more information. (See Chapter 3 of these release notes for access instructions.)

    • Limitations

      USL's Standard Components Library (lib++.a) is not and will not be available with -AA.

  • Documentation for Rogue Wave Standard C++ Library 2.2.1 is provided online in HTML format. Refer to Chapter 3 of these release notes.

  • Manual pages are located at /opt/aCC/share/man/man3.Z. To insure that you invoke a man page for the library in which you are interested, specify the appropriate section 3 sub-section. For example, to find the man page for the copy command:

    man 3n copy	    # finds the new Standard C++ Library (libstd_v2)
    man 3f copy # finds the old Standard C++ Library (libstd)
    man 3s copy # finds the Standard Components version
  • In the edit-compile-link-debug development cycle, link time is a
    significant component. With incremental linking, any unchanged
    object files can be reused without being reprocessed. Incremental
    linking allows you to insert object code into an output file (executable
    or shared library) that you created earlier, without relinking any
    unmodified object files. Time required to relink after the initial
    incremental link depends on the number of modules you modify.

    To use incremental linking, specify the +ild option on the aCC command line. If the output file does not already exist or if it was created without the +ild option, the linker performs an initial incremental link. The output file produced is suitable for subsequent incremental links.

    The +ild option is valid in 64-bit mode for both executable and shared library links. The +ild option is not valid for relocatable links, options (or tools) that strip the output module, and with some optimization options.

    In certain situations (for example, when internal padding space is exhausted), the incremental linker must perform an initial incremental link. You can avoid such unexpected initial incremental links by periodically rebuilding the output file with the +ildrelink option.

    You can debug the resulting executable or shared library produced by the incremental linker using the WDB debugger with incremental-linking support.

    See the Online Linker and Libraries User's Guide (ld +help) and ld(1) for more information.Also refer to the HP aC++ Online Programmer's Guide (aCC +help).

  • For releases prior to HP-UX 11i, the latest linker patch is needed in order to use the +objdebug option and to build shared libraries.Incremental linking is only available on HP-UX 11i or a subsequent patch.See these release notes, Chapter 2, Current Linker Required, for details.

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