HP aC++ Release Notes Version A.03.95 (5900-1789; September 2011)

HP aC++ Release Notes
Compatibility Information
Chapter 170
Compatibility Information
Maintaining binary compatibility is a key release requirement for new versions of HP aC++. The compiler
has maintained the same object model and calling convention and remains compatible with the HP-UX
runtime in the code that it generates as well as its intrinsic runtime library (libCsup) across the various
releases of HP aC++ and its runtime patch stream.
For the Standard Template Library (libstd) and a generic component/tool library (librwtool), HP aC++
relies on Rogue Wave’s Standard Library and Tools.h++ libraries. From the initial release of HP aC++
through the patch release of version A.01.06, Rogue Wave’s Standard Library version 1.2 and Tools.h++
version 7.0.3 compatible libraries were bundled with the compiler.
At the HP aC++ A.01.07 release, the runtime libraries were updated to Rogue Wave’s Standard Library
version 1.2.1 and Tools.h++ version 7.0.6. These libraries introduced additional data members in some base
classes resulting in incompatibility with the previous versions.
Floating-Point Exceptions Must be Raised Prior to Entering Library Routines
Programmers who use floating-point arithmetic must ensure that floating-point exceptions are raised before
entering a library routine. For example, a floating-point divide should be followed by a floating-point store.
If you fail to do so, code within the library may raise a floating-point exception, interrupting the library code
rather than the user code.
This is because the unwind component of libcl.a and libcl.sl uses floating-point operations in more
places than earlier versions of the library. HP aC++ uses unwind functionality to support throw/catch
exception handling. Programs which do not raise floating-point exceptions before entering unwind library
routines may have the exception raised from within the unwind routine.
Difference in Class Size When Compiling in 32-Bit and 64-Bit Mode
The size of a class containing any virtual functions varies when compiled in 32-bit mode versus 64-bit
mode. The difference in size is caused by the virtual table pointer (a pointer to an internal compiler table) in
the class object. (The pointer is created for any class containing one or more virtual functions.)
When compiling the following example in 32-bit mode, the output is 8. In 64-bit mode, the output is 16.
extern "C" int printf(const char *,...);
class A {
int a;
public:
virtual void foo(); //virtual function foo, part of class A
};