HP aC++ A.03.80 Release Notes
HP aC++ Release Notes
Compatibility Information
Chapter 1 69
extern "C" int printf(const char *,...);
class A {
int a;
public:
virtual void foo(); //virtual function foo, part of class A
};
void A::foo() {
return;
}
int main() {
printf("%d\n",sizeof(A));
}
Content of .o Files may Change
The following applies when you use the aCC command that invokes the assigner. The content
of a given .o file can potentially change when it is used in a closure (with the +inst_close
option) or link operation. The change may occur in either of the following cases:
• You change the order of .o file’s on the link line. For example, if you compile and link A.c
and B.c multiple times as follows, the contents of A.o and B.o may not be the same
following the second link as they were following the first link:
aCC -c A.c B.c
aCC A.o B.o
aCC -c A.c B.c
aCC B.o A.o
• You link a .o file with different objects. In the following example, the content of A.o may
not be the same following the second link as it was following the first link:
aCC A.o B.o
aCC A.o C.o
The Named Return Value (NRV) Optimization
The +[no]nrv option disables (default) or enables the named return value (NRV)
optimization. For this optimization to work correctly in conjunction with exception handling,
the application must be linked to an HP aC++ run-time support library that comes with
version HP aC++ A.01.04 or a later version.