Writing Code for both Compilers
Use the __cplusplus macro (defined by the draft standard) to write code that can be compiled by both HP C++ and HP aC++.
Example:
#if __cplusplus >= 199707L
//HP aC++ code
#else
//HP C++ code
#endif // __cplusplus >= 199707L
Explicit Loading and Unloading of Shared Libraries
HP aC++ uses system calls rather than C++ function calls to explicitly load and unload shared libraries. When migrating to HP aC++, make the following source code changes:
•Change cxxshl_load() to shl_load().
•Change cxxshl_unload() to shl_unload().
•Change #include <cxxdl.h> to #include <dl.h>.
Memory Allocation
See “Memory Allocation Failure and operator new” (page 203) for more information.
In HP aC++, you invoke the compiler with the aCC command instead of the CC command used to invoke HP C++.
The following sections describe differences in
•“New
•“Obsolete
•“Changed
New
Table 12 describes the new options for HP aC++. These options are not available for HP C++ (cfront). However, if a related option exists, it is noted here.
See Chapter 2:
Table 12 New
Option | Description |
|
|
Replaces the | |
|
|
+help | Invokes the HP aC++ Online Programmer’s Guide. |
|
|
+noeh | Disables exception handling. In HP aC++, exception handling is enabled by default. |
| In HP C++ (cfront), exception handling is disabled by default. To enable it, use the +eh option, |
| which is obsolete in HP aC++. |
|
|