HP aC++/HP ANSI C A.06.27 Release Notes
3 Product changes in earlier versions
New features in version A.06.26
This chapter gives an overview of the product changes in this version of the HP aC++/HP C
compiler.
HP aC++/HP C compiler version A.06.26 provides leading edge support for C++0x standard
language features, with complete binary compatibility with earlier releases and -AA compilation
mode.
Following are the changes in HP aC++/HP C compiler version A.06.26:
• “Improved GNU compatibility and new GNU features” (page 12)
Support for GNU statement expression◦
◦ Support for GNU _Pragma
• “C++0x language extensions” (page 12)
Globally unique names◦
◦ Rvalue references
• “Option to redirect make-dependency” (page 13)
• “Support for initialization of Flexible Array Member” (page 13)
• “Improved C++ Demangler” (page 14)
• “Deprecation and removal of options” (page 14)
Improved GNU compatibility and new GNU features
Support for GNU statement expression
In this release, HP aC++ compiler provides support for GNU statement expressions in default
compilation mode.
In the GNU C mode of compilation (-Agcc), a compound statement enclosed in parentheses may
appear as an expression. This is now allowed in default compilation mode, that is, even without
-Agcc. This feature allows you to use loops, switches, and local variables within an expression.
Example 1 Expression in default compilation mode
({ int y = foo (); int z; if (y > 0) z = y; else z = - y; z; })
This is a valid expression for the absolute value of foo (). The last item in the compound statement
should be an expression followed by a semicolon (;). The value of this sub-expression serves as
the value of the entire construct.
Support for _Pragma ("once")
The _Pragma ("once") operator is equivalent to #pragma once. This operator ensures that
the source file is included only once during compilation.
C++0x language extensions
This release provides two new features related to C++0x language extensions.
12 Product changes in earlier versions