HP aC++ A.03.85 Release Notes

HP aC++ Release Notes
Problem Descriptions and Fixes, and Known Limitations
Chapter 180
Source-level debugging of C++ shared libraries is supported. However, there are
limitations related to debugging C++ shared libraries, associated with classes whose
member functions are declared in a shared library, and that have objects declared outside
the shared library where the class is defined. Refer to the appropriate release notes and
manuals for the operating system and debugger you are using.
Instantiation of shared objects with virtual functions in shared memory is not supported.
When you call the shl_load(3X) routines in libdld.sl either directly or indirectly (as
and when your application calls use the +A option), an unresolved externals error is
generated.
If you want to link archive libraries and libdld.sl, use the -Wl,-a, archive option. The
following example directs the linker to use the archive version of standard libraries and
(by default) libdld.sl.
aCC prog.o -Wl,-a,archive
•Using shl_load with Library-Level Versioning
Once library-level versioning is used, calls to shl_load() should specify the actual
version of the library that is to be loaded. For example, if libA.sl is now a symbolic link
to libA.1, then calls to dynamically load this library should specify the latest version
available when the application is compiled, such as:
shl_load("libA.1", BIND_DEFERRED, 0);
This will ensure that, when the application is migrated to a system that has a later
version of libA available, the actual version desired is the one that is dynamically loaded.
Memory Allocation Routine alloca()
The compiler supports the built in function, alloca(), defined in the
/usr/include/alloca.h header file. The implementation of the alloca() routine is
system dependent, and its use is not encouraged.
alloca() is a memory allocation routine similar to malloc(). The syntax is:
void *alloca(size_t <size>);
alloca() allocates space from the stack of the caller for a block of least size bytes, but
does not initialize the space. The space is automatically freed when the calling routine
exits.
NOTE Memory returned by alloca() is not related to memory allocated by other
memory allocation functions. Behavior of addresses returned by alloca()
as parameters to other memory functions is undefined.