HP aC++/HP ANSI C A.06.28 Release (769149-001, March 2014)

Example 2 Globally unique names for unnamed types and static routines
template void f(T) {} template void f(T, T1) {} struct {} s; enum {} e; static void f2(); void f1() { f2();
// ZN22_INTERNAL_3_x_c__Z2f1v2f2Ev f(s);
// _Z1fIN22_INTERNAL_3_x_c__Z2f1v4__C1EEvT f(e);
// IA-64: Z1fIN22_INTERNAL_3_x_c__Z2f1v4__E2EEvT f(s, s);
//_Z1fIN22_INTERNAL_3_x_c__Z2f1v4__C1ES1_EvT_T0_ f(e, e);
// Z1fIN22_INTERNAL_3_x_c__Z2f1v4__E2ES1_EvT_T0 f(s, e);
//_Z1fIN22_INTERNAL_3_x_c__Z2f1v4__C1ENS0_4__E2EEvT_T0_ }
static void f2() { struct A {} a; f(a);
//_Z1fIZN22_INTERNAL_3_x_c__Z2f1v2f2EvE1AEvT_ }
Rvalue references
This feature is enabled with the -Ax option, which turns on support for selected features from the
upcoming C++ standard (called C++0x).
The existence of Rvalue references allows the declaration of move constructors, which can be used
to efficiently copy class objects by transferring the resources from a source object, that is soon to
be defunct, to a destination object.
Option to redirect make-dependency
The options +make and +Make generate the make-dependency list, and writes this out to the
stdout. This list can be captured into a .d file that is based on the basename of the object file.
The new option +Makef writes out the make-dependency to a file that you specify (including the
file name and location). This facility is on the lines of the GNU options -M and -MF.
Example 3 Redirecting make-dependency to a file
aCC +Makef make_dependency_output_file source_file
aCC +Makef hello.make-dep hello.c
Support for initialization of Flexible Array Member
The compiler now supports the initialization of Flexible Array Member. Following are the
characteristics of this implementation:
Flexible array members are written as contents[] without the 0.
Flexible array members have incomplete type, and so the sizeof operator may not be
applied. As a side effect of the original implementation of zero-length arrays, sizeof evaluates
to zero for flexible array members.
Flexible array members must appear as the last member of a struct that is otherwise non-empty.
A structure containing a flexible array member, or a union containing such a structure (possibly
recursively), must not be a member of a structure or an element of an array.
NOTE: These uses are permitted by GCC as extensions.
Example 4 Initialization of Flexible Array Member
struct test_vla_init_nums_st { int numCC; int nums[]; };
static struct test_vla_init_nums_st test_vla_init_nums ={3, {1,2,3}
Improved C++ Demangler
The C++ demangler c++filt has been improved to use better algorithms, which are more robust
and standard compliant. There are no changes to the external interface.
NOTE: __cxa_demangle has not changed in this release.
22 Product changes in earlier versions