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 Integrity Servers: HP aC++/HP ANSI C Release Notes > Chapter 2 What’s New in This Version

New Features in Version A.06.10

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Version A.06.10 of the HP aC++ compiler provides complete source and binary compatibility (including OpenMP features) with earlier versions of the A.06.xx family.

HP aC++ compiler version A.06.10 supports the following new features:

  • HP Code Advisor

  • +cond_rodata Option (Obsoleted)

  • +[no]dep_name Option (New)

  • +expand_types_in_diag Option (New)

  • +FPmode (Enhanced)

  • +Ointeger_overflow Option (Default Changed)

  • +Onolibcalls= Option (New)

  • +wendian Option (New)

  • +wlint Option (Enhanced)

  • +wsecurity= Option (New)

  • System-wide option configuration (New)

  • [NO]PTRS_TO_GLOBALS Pragma (New)

  • -AA -D_HP_NONSTD_FAST_IOSTREAM performance Macro (New)

  • New function attributes

  • Improved Diagnostics

  • C++ Standard Library

HP Code Advisor

This release introduces a new tool "HP Code Advisor", that can be used for detecting various programmer errors in C/C++ source code. Use this tool to identify potential coding errors, porting issues and security errors.

The HP Code Advisor is being made available on both HP-UX PA and Integrity servers. It leverages the advanced analysis capabilities of the C/C++ compilers for the Integrity servers.

Use "/opt/cadvise/bin/cadvise" to invoke the tool. A brief description is available with the -help option.

$ /opt/cadvise/bin/cadvise -help

Additional information is available at: http://www.hp.com/go/cadvise/

+cond_rodata Option (Obsoleted)

The compiler now allocates more data in read-only memory. This option is now obsolete. The compiler always behaves as if it had been specified. (Note: a previous posting of these notes contained a typographic error. +cond_rodata was mispelled.)

+[no]dep_name Option (New)

+[no]dep_name enforces strict dependent name lookup rules in templates. The default is +nodep_name.

+expand_types_in_diag Option (New)

+expand_types_in_diag expands typedefs in diagnostics so that both the original and final types are present.

+FPmode Option (Enhanced)

+FPmode specifies how the run time environment for floating-point operations should be initialized at program start up. By default, modes are as specified by the IEEE floating-point standard: all traps disabled, gradual underflow, and rounding to nearest. See ld(1) for specific values of mode. To dynamically change these settings at run time, refer to fenv(5), fesettrapenable(3M), fesetflushtozero(3M), and fesetround(3M).

+Ointeger_overflow (Default Changed)

The default setting for all optimization settings is now "moderate".+Ointeger_overflow=moderate

+Onolibcalls= Option (New)

+Onolibcalls= allows you to turn off optimization for listed fun ctions.

+Onolibcalls=function1,function2,...

This allows you to turn off libcall optimizations (inlining or replacement) for calls to the listed functions. This overrides system header files.

+wendian Option (New)

This option allows the user to identify areas in their source that might have porting issues when going between little-endian and big-endian.

+wlint Option (Enhanced)

New diagnostic features have been added for this option. New checks have been added for memory leaks, out-of-scope memory access, null pointer dereference, and out-of-bounds access.

+wsecurity= Option (Enhanced)

The +wsecurity option now optionally takes a argument to control how verbosely the security messages are emitted:

+wsecurity=[1|2|3|4]

The default level is 2.

System-wide Option Configuration

There is a new ability to configure compiler options on a system-wide basis. The compiler now reads the configuration file:

/var/aCC/share/aCC.conf (aC++), or

/var/ansic/share/cc.conf (ANSI C), if present.

The options in the configuration file can be specified in the same manner as that for CCOPTS and CXXOPTS, namely:

[options-list-1][| [options-list-2]]

where options in options-list-1 are applied before the options in the command line, and options in options-list-2 are applied after the options in the command line.

The final option ordering would be:

<file-options-1><envvar-options-1><command-line-options>

<envvar-options-2><file-options-2>

The config file options before the "|" character set the defaults for compilations, and the options after the character override the user’s command line settings.

NOTE: No configuration files are shipped along with aC++, but can be installed by the system administrator, if required.

[NO]PTRS_TO_GLOBALS Pragma

#pragma [NO]PTRS_TO_GLOBALS <name>

This pragma aids alias analysis. It must be specified at global scope and immediately precede the declaration of the variable or entry named. The pragma tells the optimizer whether the global variable or entry "name" is accessed [is not accessed] through pointers.

-AA -D_HP_NONSTD_FAST_IOSTREAM Performance Improvement Macro

A new performance improvement preprocessor macro, _HP_NONSTD_FAST_IOSTREAM can be used to improve -AA iostream performance.

This macro enables the following non-standard features:

  • Sets std::ios_base::sync_with_stdio(false), which disables the default synchronization with stdio.

  • Sets std::cin.tie(0), which unties the cin from other streams.

  • Replaces all occurrences of "std::endl" with "\n".

Enabling this macro might result in noticeable performance improvement if the application uses iostreams often.

NOTE: Do not enable the macro in any of the following cases:
  • If the application assumes a C++ stream to be in sync with a C stream.

  • If the application depends on stream flushing behavior with endl.

  • If the user uses "std::cout.unsetf(ios::unitbuf)" to unit buffer the output stream.

New Function Attributes

__attribute__ is a language feature that allows you to add attributes to functions. The capabilities are similar to those of #pragma. It is more integrated into the language syntax than pragmas and its placement in the source code depends on the construct to which the attribute is being applied.

The new function attributes in this release are "malloc", "non-exposing", "noreturn", and "format". Refer to the Pragmas and Attributes online help topic for additional information.

Improved Diagnostics

Diagnostic messages now include more context to aid in tracing their root causes, including an improved template instantiation traceback.

C++ Standard Library Change

Technical Corrigenda 1 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.

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