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-UX Systems: HP aC++ Release Notes > Chapter 1 HP aC++ Release Notes

New Features in Version A.03.37

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

New features in HP aC++ version A.03.37 are listed below:

Rogue Wave Tools.h++ Version 7.1.1 Compatible with -AA

Rogue Wave Tools.h++ library version 7.1.1 can now be used with -AA option, that is, it can be used with the Standard C++ Library 2.1.1. Note that the earlier Tools.h++ library version 7.0.6 could not be used with -AA.

UTF-16 Character Transformation Format Support

The current compiler supports only ASCII strings or characters (8 bit chars with no transliteration) as UTF-16. UTF-16 is described in the Unicode Standard, version 3.0 [UNICODE]. The definitive reference is Annex Q of ISO/IEC 10646-1 [ISO-10646].

Any string or character which is preceded by ‘u’ is recognized as a UTF-16 literal or character and is stored as an unsigned short type.

Example:

#define _UTF16(x) u##x#define UTF16(y) _UTF16(#y)typedef unsigned short utf16_t;utf16_t *utf16_str = UTF16(y);  // u”y”int size = sizeof(u’t’);        // size of 2 bytes

__restrict Keyword Support

The __restrict keyword is now recognized by the compiler. Refer to the description of the C99 restrict type-qualifier keyword in ISO/IEC 9899:1999 (6.7.3).

+ub and +sb Options to Control Bitfield Signedness

The +ub option treats unqualified bit fields as unsigned. The +sb option treats unqualified bit fields as signed. The +uc option overrides +sb option for char bitfields.

Note that in 64 bit mode, +sb option is set by default, to match HP C.

ANSI C++ Covariant Return Type

With this release, covariant return type feature is fully supported. Basically, return type of an overriding function can be a pointer or reference to a class derived from the return type of the base class.Example 1:

class BaseClass    {      public:      virtual BaseClass* foo();    };    class DerivedClass : public BaseClass    {      public:      DerivedClass*    foo();    };

Example 2:

    class BaseClass_1    {      public:      virtual BaseClass_1* foo();    };    class BaseClass_2    {      public:      virtual BaseClass_2* goo();    };    class DerivedClass : public BaseClass_1, BaseClass_2    {      public:      DerivedClass*    goo();    };
NOTE: HP WDB3.1 does not support covariant return types. So, gdb can’t step into a covariant function. However, setting a breakpoint at a covariant function and running into it will work fine. Debugger will show the internal compiler generated function, when a user does a backtrace, or finish, or return in gdb at a covariant function.

Improved Support for PCH with -AA

Support for using the PCH feature with -AA option has been improved. A significant number of problems have been addressed since the previous release. Note that, this feature is not fully supported in -AA mode. There may be unexpected compile-time problems.

Improved Support for Pack and Align Pragmas

See HP aC++ Online Programmer’s Guide at http://docs.hp.com for more details.

Improved DOC (Debug Optimized Code) Support

Ability to debug the optimized C++ code (DOC) has been improved significantly in this release. To use these improvements, set the environment variable aCC_DOC_MODE to ON.

Example:

    $ cat sample.C    #include <stdio.h>    int x = 1;    int main() {        int j = 4;        printf(“we are here:%d:\n”, j);    }

    $ aCC_DOC_MODE=ON aCC -g -O sample.C

Now, with the improved DOC, while debugging the above sample program you can display the correct value of local variable j.

NOTE: In further releases, the above environment variable will be automatically set by the compiler.

Performance Improvements to -AA iostream

Standard C++ Iostreams have been further tuned to improve the performance of I/O. Sometimes, the obtained performance may be comparable to that of old iostream.h library (that is, -AP).

Thread Muted Contention Fix on Null Strings with -AP

Using the string template (with -AP) in a threaded environment may result in excessive contention on a single null string mutex. This is because of the usage of a single null string object for default initialization and string modifications.

This fix is enabled with -D__HPACC_THREAD_NULL_STRING

NOTE: There is a very small chance that mixing objects or libraries compiled with and without -D__HPACC_THREAD_NULL_STRING will lead to incompatibilities. This is because the new implementation sets the null string reference count to INT_MAX/2 whereas the old implementation would increment or decrement the reference count. There is a very small chance that the reference count may incorrectly go to 0 and the null string object may get deleted.

Patches Required

The following patches must be installed after installing version A.03.37 to able all new features:

For HP-UX 11.00:

  • PHCO_24723 (libc)

  • PHCO_23792 (libpthread)

  • PHSS_24303 (linker)

  • PHSS_26945 (aC++ runtime)

  • PHSS_25028 (libomp)

For HP-UX 11.11:

  • PHCO_24400 (libc)

  • PHCO_23846 (libpthread)

  • PHSS_24304 (linker)

  • PHSS_26946 (aC++ runtime)

  • PHSS_25029 (libomp)

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