| United States-English |
|
|
|
![]() |
HP-UX Systems: HP aC++ Release Notes > Chapter 1 HP
aC++ Release NotesNew Features in Version A.03.65 |
|
HP aC++ version A.03.65 supports the following new features: Now, a list of function names can be specified as arguments to the +Onolibcalls option. The function names can be given after a '=' following the +Onolibcalls option. If multiple function names have to be specified, they must be separated by commas as shown. There cannot be any intervening spaces or blanks. Multiple functions can also be specified with multiple +Onolibcalls options. The functions specified are expected to be part of the millicode routines' library. This new syntax of the +Onolibcalls option allows users to selectively disable the inlining of only the specified library routines. Previously, it was possible only to either inline all the library routines (using +Olibcalls) or to disable all of them (using +Onolibcalls). From this release, the compiler does further optimizations with NRV (Named Return Value optimization) to eliminate unnecessary calls with const initializations. For example:
In this case, the compiler eliminates the copy constructor call. With this release, there is a significant reduction in compile time for applications involving operator overloading and function overloading. HP aC++ Version A.03.65 now supports debugging of inline functions. This feature enables you to set breakpoints and watch points, do 'step-in' and 'step-out', and display, view, or change the value of local variables in inline functions using WDB. To enable this feature, use the +inline_debug option, which will implicitly pass the -g option to the compiler. This version significantly improves the support for C++ template features with more conformance to the ISO/IEC 14882 C++ Standard. Specifically, support for member templates, argument deduction, partial specialization, and dependent name lookup have been improved. When pthread_exit is called in multithreaded C++ applications, the exiting thread exits without calling destructors for the active local objects. This behavior is not always desirable, certain applications might require the destructors to be called for objects on the stack of exiting thread. From this release, support is provided for calling destructors for active local objects when pthread_exit is called on a thread. To enable this feature, you need to set the environment variable aCC_PTHREAD_EXIT_CLEANUP=1|ON. Consider the following example:
With this feature enabled, for this example, both the constructors and destructors will be called for local variables a1 and a2 in functions foo and bar. This feature requires exception handling info and if functions are compiled with +noeh, no destructors will be called with no indication of a problem. This is similar to mixing and matching +eh code with +noeh code and doing a throw across the mixture. This feature is available only in the shared version of C++ runtime library and on HP-UX 11.x PA-RISC versions. Prior to this release, the aCC compiler disallowed accessing of members of enclosing class from a nested class. Friend access was required for such cases. However, the C++ Standards Committee is planning to relax this restriction and this feature is implemented in many compilers. With this release, a member of a class can also access all names as it accesses the names in the class of which it is a member:
Two changes have been made to increase performance of strings with -mt. The first helps -AP strings. Locking is no longer done for the null string. This should eliminate thread contention when creating empty strings. This has always been available for -AA strings. In the second, a new flag has been defined to reduce the amount of space for string mutexes and thereby increase performance when using either -AA or -AP strings. Instead of having one mutex per string, there is now a fixed array of mutexes that are shared amongst all strings. Because this feature requires a new runtime, it is enabled with -D__HPACC_FIXED_REFCNT_MUTEX and requires the following aC++ runtime patches:
And the following new symbols are defined in aC++ runtime library (libCsup):
The number of string mutexes defaults to 64 and can be configured by:
You can mix code compiled with and without -D__HPACC_FIXED_REFCNT_MUTEX provided you have the new aC++ runtime installed. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||