HP aC++/HP C A.06.25 Programmer's Guide
12 Migrating from HP C++ (cfront) to HP aC++
This chapter discusses differences in syntax and functionality that you need to consider
when migrating from HP C++ (cfront) to HP aC++.
It discusses the following topics:
• “General Guidelines for Migration” (page 261)
• “Command-Line Differences” (page 262)
• “Migration Considerations when Debugging” (page 266)
• “Migration Considerations when Using Exception Handling” (page 266)
• “Migration Considerations when Using Libraries” (page 272)
• “Migration Considerations Related to Standardization” (page 274)
• “Migration Considerations when Using Templates” (page 288)
NOTE: The HP C++ and HP aC++ compilers execute independently and can be installed
on a single system. HP C++ is located at /opt/CC. HP aC++ is located at /opt/aCC.
General Guidelines for Migration
Because of incompatibilities in areas such as name mangling, libraries, and object layout,
all of your C++ code for an application or library must be compiled and linked with
either HP C++ (cfront) or with HP aC++. You cannot mix object files compiled with HP
C++ (cfront) with those compiled with HP aC++.
This section discusses the general guidelines when migrating from HP C++ (cfront) to
HP aC++.
Getting Started with Migration
Complete the following procedure to migrate your code from HP C++ (cfront) to HP
aC++:
1. Compile your code with the HP C++ (cfront) compiler using the +p option. This
option requests the compiler to treat anachronistic constructs as errors. Fix the
anachronisms. For example:
CC +p cfrontfile.C
2. In your Makefiles:
• Change CC to aCC.
• Set the path to/opt/aCC/bin.
• Review command-line options and change when necessary.
General Guidelines for Migration 261