| United States-English |
|
|
|
![]() |
HP-UX Systems: HP aC++ Release Notes > Chapter 1 HP
aC++ Release NotesWhat’s in This Version |
|
This section gives an overview of the new features introduced in this version of the HP aC++ compiler. Following are the new features in HP aC++ version A.03.70:
This release introduces a new tool, HP Code Advisor (cadvise) that enables programmers to detect various programming errors in C and C++ source code. This tool helps you to identify potential coding errors, porting issues, and security errors. You can invoke this tool from /opt/cadvise/bin/cadvise in the command line. For more information on how to use the various options in this tool, see the HP code Advisor Release Notes. The updated version of the HP Code Advisor is also available for free download at:
This new command-line option allocates only as many bytes as required for the declared range of possible values to an enum type. The enum type is equivalent to the smallest integral type, which has enough memory space for the declared enumerator range.
HP aC++ A.03.70 has a new performance improvement preprocessor directive, -D_HP_NONSTD_FAST_IOSTREAM, which improves the iostream performance. This directive enables the following non-standard features:
Enabling this directive might result in noticeable performance improvement, if the application uses iostreams more often.
A new command-line option, +rodata_array_init is added in HP aC++ A.03.70 to enable memory efficient initialization for local arrays. When you use this option, the compiler allocates the local array initializers (that it generates for initialized local arrays) to the read-only data section. By default, these initializers are allocated to the data section.
The option mapping support available in HP aC++ A.03.70 facilitates easy migration of build environment from a different compiler to HP aC++. You can use the option mapping files to map the options in the third party compilers to HP aC++ equivalents Mapping File: The mapping file is a text file that defines the mapping rules. The compiler reads the mapping file and applies the specified replacements to the options on the command line. This minimizes the need to make Makefile or script changes. By default, the path for the mapping file is set to the following location: /opt/aCC/lib/option.map You may either define the mapping rules in this file or set the mapping file path to an alternate location. To specify an alternate location, set the CXX_MAP_FILE environment variable, like the following example:
where: To disable the use of the mapping file (in spite of having one in the default location), set the above environment variable to NULL, like the following example:
Defining the Mapping Rules: Following is the syntax for defining the rules in the mapping file:
Where: To define rules for options that have arguments, use the $<number> wildcard. For example, $1 for the first argument, and $2 for the second. If the third party compiler option (LHS) does not match with any HP aC++ option, leave the RHS blank. Example Rules: The following example rules map gcc compiler options to corresponding HP aC++ compiler options. The same rules can be used for mapping options from any third party compiler. The syntax for the rule becomes as follows:
You can specify default sitewide options for HP aC++ in a configuration file. On startup, HP aC++ reads, and applies the default options from the file if the file is found and readable. No default options are set if the file is not found or readable. The default path of the configuration file is set to the following locations: /var/ansic/share/cc.conf in C mode To change the path of the configuration file, use the following environment variables:
The options in the configuration file can be specified in the same format as that for CCOPTS and CXXOPTS.
Where: The final option ordering is as follows:
Technical Corrigenda 1 (TC1) of the ANSI/ISO C++ Standard has changed the STL function make_pair to take their arguments by value instead of const reference. This change brings the HP library into compliance if the enabling macro -D__HP_TC1_MAKE_PAIR is specified at compile time. For binary compatibility reasons, the default behavior is unchanged. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||