HP aC++ Version A.05.30 Release Notes
5971-2284
June 2001
Copyright 2001 Hewlett-Packard Company
Legal Notices
Copyright Hewlett-Packard Company 2001. All rights are reserved. Reproduction,
adaptation, or translation without prior written permission is prohibited,
except as allowed under the copyright laws.
Hewlett-Packard makes no warranty of any kind with regard to this document,
including, but not limited to, the implied warranties of merchantability
and fitness for a particular purpose. Hewlett-Packard shall not be liable
for errors contained herein nor direct, indirect, special, incidental or
consequential damages in connection with the furnishing, performance, or
use of this material. Information in this publication is subject to change
without notice.
Corporate Offices: Hewlett-Packard Co., 3000 Hanover St., Palo Alto,
CA 94304
Use, duplication or disclosure by the U.S. Government Department of
Defense is subject to restrictions as set forth in paragraph (b)(3)(ii)
of the Rights in Technical Data and Software clause in FAR 52.227-7013.
Rights for non-DOD U.S. Government Departments and Agencies are as set
forth in FAR 52.227-19(c)(1,2).
Use of this document and flexible disc(s), compact disc(s), or tape
cartridge(s) supplied for this pack is restricted to this product only.
Additional copies of the programs may be made for security and back-up
purposes only. Resale of the programs in their present form or with alterations,
is expressly prohibited.
A copy of the specific warranty terms applicable to your Hewlett-Packard
product and replacement parts can be obtained from your local Sales and
Service Office.
© Copyright 1980, 1984, 1986 AT&T Technologies, Inc. UNIX and
System V are registered trademarks of AT&T in the USA and other countries.
UNIX is a registered trademark in the United States and other countries,
licensed exclusively through X/Open Company Limited.
PostScript is a trademark of Adobe Systems, Inc.
© Copyright 1985-1986, 1988 Massachusetts Institute of Technology.
X Window System is a trademark of the Massachusetts Institute of Technology.
Preface
This document provides the following information:
-
features
-
installation information
-
related documentation
-
problem descriptions and fixes and known limitations
Note: The software code printed in the release notes title indicates the
software product version at the time of release. Some product and operating
system changes do not require changes to documentation; therefore, do not
expect a one-to-one correspondence between these changes and release notes
updates.
Latest printing: June, 2001
This document resides online in the following locations: /opt/aCC/newconfig/RelNotes/ACXX.release.notes
To print this file, use an lp command like the following: lp -dprinter_name
/opt/aCC/newconfig/RelNotes/ACXX.release.notes
Use your browser to access the HP aC++ Home Page and look at the documentation:
http://devresource.hp.com/devresource/Tools/cpp/index.html
Problem Reporting:
If you have any problems with the software or documentation, please contact
your local Hewlett-Packard Sales Office or Customer Service Center.
Chapter 1: Features
This chapter summarizes the features included in this version of the
HP aC++ Itanium Processor Family (IPF) compiler. The compiler supports
much of the ISO/IEC 14882 Standard for the C++ Programming Language (the
international standard for C++).
HP aC++ provides a variety of performance related options, in addition
to the options described in these release notes. See the "HP aC++
Online Programmer's Guide" "Performance" section for full documentation.
Chapter 3 of these release notes provides access instructions to the guide.
New Features
Standard C++ Library 2.0 based on the new Rogue Wave SL 2.0
The -AA command line option enables use of the new 2.0 Standard C++
Library, which includes the new standard conforming ("templatized") iostream
library. It conforms to the ISO C++ standard.
The 2.0 library is not compatible with the version 1.2.1 Standard C++
Library previously bundled with HP aC++. HP aC++ will continue support
for standard C++ library 1.2.1 without name or location change. Customers
should not notice any change when -AA is not used. However, the 1.2.1
library is deprecated and will be replaced by the new library eventually.
If you wish to use the new 2.0 library, you must use the -AA option
consistently to compile and link all translation units. Mixing object
files within an executable is not supported.
The default is for -AA to be on with -Wc,-ansi_for_scope,off.
The new -AP option turns -AA mode off.
HP Caliper is now bundled with Hp aC++.
HP Caliper 1.0 is a new general-purpose performance analysis and performance
improvement tool for Itanium-based applications bundled with HP ANSI C,
HP aC++, and HP Fortran 9x. HP Caliper helps you analyze and improve
the performance of your native Itanium-based programs in three ways:
-
A simple and quick way to optimize the performance of your program by providing
information for compiler profile-based optimization.
-
Commands to measure the overall performance of your program.
-
Commands to drill down to identify performance parameters of specific functions
in your program.
A significant advantage of HP Caliper is that it requires no special compilation,
link options, or libraries for your Itanium-based programs. HP Caliper
dynamically measures performance on:
-
C, C++, and Fortran 9x binaries
-
32- or 64-bit binaries
-
Shared or archive libraries
-
Debug or optimized programs
Another advantage is that HP Caliper performs its measurements with low
overhead and for well-behaved executables, HP Caliper does not alter the
semantic behavior of the target program.
Required disk space is 12 MB. Memory requirements vary with settings
used for performance measurement.
Documentation
HP Caliper 1.0 includes the following documentation:
-
On-line User Guide in HTML format available with the +help option.
-
Printable User Guide in PDF format.
-
Command-line option summary available with --help option.
-
The caliper (1) man page.
HP CXperf
CXperf is bundled with ANSI C, aC++ and Fortran Compilers.
CXperf is an interactive runtime performance analyzer for programs compiled
in 32- and 64-bit mode with HP Fortran 90, ANSI C++, and ANSI C compilers.
CXperf collects data on a per-process basis for MPI and scalar applications,
and a per-thread basis for pthreads and compiler-based parallelism.
Additionally, CXperf provides shared library profiling.
Required disk space is approximately 10MB Runs only on HP-UX 11.x or
higher For additional information and software updates, please visit http://devresource.hp.com/devresource/Tools/cxperf/index.html
Migrating from HP C++ (cfront) to HP aC++
The compiler lists Errors, Future Errors and Warnings. Expect to
see more warnings, errors and future errors reported in your code, many
related to standards based syntax. For more complete information,
refer to:
-
"HP aC++ Transition Guide" at the following world wide web URL:
http://devresource.hp.com/devresource/tools/cpp/index.html
The "HP aC++ Online Programmer's Guide" section "Migrating from
HP C++ (cfront) to HP aC++" contains a subset of the information found
in the transition guide.
-
For general background information and experience, subscribe to the cxx-dev
list server (like a notes group). Send a message to majordomo@cxx.cup.hp.com
with the following command in the body of the message: subscribe
list-name
Available list-names are as follows:
cxx-dev
HP C++ Development Discussion List
cxx-dev-announce HP C++ Development Announcements
cxx-dev-digest HP C++ Development Discussion
List Digest
cxx-dev-announce is also broadcast to cxx-dev, so there is only a need
to subscribe to one of the lists. The digest also includes both cxx-dev
and cxx-dev-announce.
For additional help or information about the list server, send a message
to majordomo@cxx.cup.hp.com with the following command in the body of the
message: help
Also, search the cxx-dev archives at the following URL: http://www.devresource.hp.com/devresource/Forums/Forums.html
-
For specific support questions, contact your HP support representative.
-
For generic C++ questions, see documents and URL's listed in the"HP aC++
Online Programmer's Guide, Information Map."
Some migration issues are listed below:
-
The overload resolution for operators has been updated to reflect the latest
version of the ISO/ANSI C++ standard. You may see additional "ambiguous"
function error messages displayed.
-
Most frequently reported migration issue: enum x { x1, };
he trailing comma is an error, and aC++ generates Warning 921.
-
Changes to temporary creation for rvalues used to initialize return values
which are const references now causes:
Error 652: Exact position unknown; near file, line#. Initialization
of the result <some const &> requires creating a temporary, yet
the temporary's lifetime ends with the return from the function.
-
You can bracket your changes with the macro defined by the ISO/ANSI C++
standard. For example:
#if __cplusplus >= 199707L
// HP aC++ Code
#endif // __cplusplus >= 199707L
-
If you are using directed mode instantiation with the cfront based compiler,
an awk script can be used to convert your file to an instantiation file
that uses the explicit instantiation syntax. Note that explicit instantiation
syntax can be used to instantiate a template and all of its member functions,
an individual template function, or a template class's member function.
The "HP aC++ Online Programmer's Guide" contains an example script. In
a template, a name with a parameter-dependent qualifier is not taken to
be a type unless it is explicitly declared as one with the typename keyword.
You need to explicitly declare a type or a member function type
using the typename keyword when all of the following are true:
-
The code is inside a template.
-
The name is qualified (i.e., it has a "::" token in it).
-
The qualifier (to the left of the "::" token) depends on a template parameter.
For example, the following code includes the typename keyword to
declare iterator as a type:
#include <list>
template <class Element>
class Foo {
public:
list<Element> e;
typedef typename list<Element>::iterator MyIterator;
};
For more information, refer to the "HP aC++ Transition Guide" at
the following World Wide Web URL:
http://devresource.hp.com/devresource/tools/cpp/tguide/index.html
Chapter 2: Installation Information
Read this entire document and any other release notes or Readme files
you may have before you begin an installation.
To install your software, run the SD-UX swinstall command. It
will invoke a user interface that will lead you through the installation.
For more information about installation procedures and related issues,
refer to "Managing HP-UX Software with SD-UX" and other README, installation,
and upgrade documentation provided or described in your HP-UX 11.x operating
system package.
Depending on your environment, you may also need documentation for other
parts of your system, such as networking, system security, and windowing.
HP aC++ requires approximately 185 MB of disk space: approximately
100 MB for the files in /opt/aCC, 15 MB for WDB, and 56 MB for u2comp.
For more precise sizes, use the command: /usr/sbin/swlist -a size
"YourProductNumber"
Chapter 3: Related Documentation
Documentation for HP aC++ is described in the following sections.
Online Documentation
The following online documentation is included with the HP aC++ product:
-
"HP aC++ Online Programmer's Guide"
Access the guide in any of the following ways:
-
Use the +help command-line option: /opt/aCC/bin/aCC +help
-
From your web browser, enter the appropriate URL:
file:/opt/aCC/html/C/guide/index.htm (English)
file:/opt/aCC/html/ja_JP.SJIS/guide/index.htm (Japanese)
To see Japanese characters when using the Netscape browser, choose:
-
Options
-
Document Encoding
-
Japanese (Auto-Detect)
NOTE: All of the files composing the English version of the guide
are installed in the /opt/aCC/html/C/ directory. If you choose to move
the entire English guide to a different location without having to edit
any links, you will need to move all of the
subdirectories in /opt/aCC/html/C/. All of the files composing the Japanese
guide are installed in /opt/aCC/html/ja_JP.SJIS/.
-
The English guide (excluding Rogue Wave documentation) is also available
on the World Wide Web at the following URL: http://docs.hp.com/hpux/development/
-
"Using Templates in HP aC++"
This technical document summarizes template features defined
in the proposed C++ standard and describes template instantiation as implemented
in HP aC++. It is provided with HP aC++ in both postscript and HTML format
in the following locations:
/opt/aCC/newconfig/TechDocs/templates.ps
/opt/aCC/html/C/templates/templates.htm
-
"HP-UX 64-bit Porting and Transition Guide"
Helps developers transition applications from an HP-UX 32-bit platform
to the HP-UX 64-bit platform. This document is located at:
opt/aCC/newconfig/TechDocs/64bitTrans.bk.ps
Also available on the HP-UX 11.x CD-ROM and on the World Wide Web at the
following URL: http://docs.hp.com/hpux/development/
-
"HP Linker and Libraries Online User Guide"
To access, use the command: /usr/ccs/bin/ld +help
-
HP Wildebeest Debugger (HP WDB)
All of the HP WDB documentation is available online in the following
directory: /opt/langtools/wdb/doc
The most current HP WDB and its related documentation is available
online at the following World Wide Web directory:
http://www.hp.com/go/wdb
-
"Rogue Wave Software Standard C++ Library 2.2.1 Class Reference"
This reference contains an alphabetical listing of all of the classes,
algorithms, and function objects in the updated Rogue Wave Standard C++
Library. The library includes the standard iostream library and has
namespace std enabled.
The reference is provided as HTML formatted files. You can view
these files with an HTML browser by opening the following file:
opt/aCC/html/libstd_v2/stdref/index.htm
Or select from the initial window of the "HP aC++ Online Programmer's
Guide."
-
"Rogue Wave Software Standard C++ Library 2.2.1 User's Guide"
This guide gives information about library usage and includes an extensive
discussion of locales and iostreams.
The guide is provided as HTML formatted files. You can view these
files with an HTML browser by opening the following file:
opt/aCC/html/libstd_v2/stdug/index.htm
Or select from the initial window of the "HP aC++ Online Programmer's Guide."
-
"Rogue Wave Software Standard C++ Library 1.2.1 Class Reference"
This reference provides an alphabetical listing of all of the classes,
algorithms, and function objects in the prior Rogue Wave implementation
of the Standard C++ Library. It is provided as HTML formatted files.
You can view these files with an HTML browser by opening the following
file: /opt/aCC/html/libstd/ref.htm
-
"Rogue Wave Software Tools.h++ 7.0.6 Class Reference"
This reference describes all of the classes and functions in the Tools.h++
Library. It is intended for use with Rogue Wave Standard C++ Library
1.2.1.
The reference is provided as HTML formatted files. You can view
these files with an HTML browser by opening the following file:/opt/aCC/html/librwtool/ref.htm
NOTE: Although the documentation for Appendix A is supplied with
aC++, this is an obsolete interface to Tools.h++ that predates the version
that is integrated with the STL. (If building from the Rogue Wave
source, you must compile with -DRW_NO_STL.)
There are 8 templates documented in the main part of the manual as "still
supported". This is incorrect. The interfaces for the following
8 templates must be translated to the new interface with two extra template
arguments:
RWTPtrHashDictionary
==> RWTPtrHashMap
RWTPtrHashDictionaryIterator ==> RWTPtrHashMapIterator
RWTPtrHashTable
==> RWTPtrHashMultiSet
RWTPtrHashTableIterator ==> RWTPtrHashMultiSetIterator
RWTValHashDictionary
==> RWTValHashMap
RWTValHashDictionaryIterator ==> RWTValHashMapIterator
RWTValHashTable
==> RWTValHashMultiSet
RWTValHashTableIterator ==> RWTValHashMultiSetIterator
Refer to defect CR JAGaa90638.
NOTE: Refer to the "HP aC++ Online Programmer's Guide" Information
Map for how to obtain additional Rogue Wave documentation and information.
-
"HP aC++ Release Notes" is this document. The online ASCII file can
be found in /opt/aCC/newconfig/RelNotes/ACXX.release.notes.
-
Online manual pages for aCC and c++filt are at /opt/aCC/share/man/man1.Z.
Manual pages for the Standard C++ Library and the cfront compatibility
libraries (IOStream and Standard Components) are provided under /opt/aCC/share/man/man3.Z.
Japanese man pages are located at:
/opt/aCC/share/man/ja_JP.eucJP/man1.z and
/opt/aCC/share/man/ja_JP.eucJP/man3.z (for the euc character set)
/opt/aCC/share/man/ja_JP.SJIS/man1.z and
/opt/aCC/share/man/ja_JP.SJIS/man3.z (for the SJIS character set)
Online C++ Example Source Files
Online C++ example source files are located in the directory, /opt/aCC/contrib/Examples/RogueWave.
These include examples for the
Standard C++ Library and for the Tools.h++ Library.
Printed Documentation
"HP aC++ Release Notes" is this document. A printed copy of the release
notes is provided with the HP aC++ product. Release notes are also
provided online, as noted above.
Other Documentation
Refer to the "HP aC++ Online Programmer's Guide" Information Map for documentation
listings, URL's, and course information related to the C++ language.
Also, see below.
The following documentation is available for use with HP aC++. To order
printed versions of Hewlett-Packard documents, refer to manuals(5).
-
"Parallel Programming Guide for HP-UX Systems" (B6056-90006) describes
efficient parallel programming techniques available for the HP Fortran
90, HP C, and HP aC++ compilers on HP-UX.
This document is available on the HP-UX 11.x CD-ROM and on the World
Wide Web at the following URL: http://docs.hp.com/hpux/development/
To order a paper copy, contact Hewlett-Packard's Support Materials Organization
(SMO) at 1-800-227-8164 and provide the above part number.
HP aC++ World Wide Web Homepage
Access the HP aC++ World Wide Web Homepage at the following URL:
http://devresource.hp.com/devresource/Tools/cpp/index.html
Refer to the Homepage for the latest information regarding:
-
Frequently Asked Questions
-
Release Version and Patch Table
-
Purchase and Support Information
-
Documentation Links
-
Compatibility between Releases
Compatibility between HP aC++ Releases
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 run-time patch stream.
For the Standard Template Library (libstd) and a generic component/tool
library (librwtool), HP aC++ (as well as some other C++ compilers) 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 new libraries introduced additional data members in some base classes
resulting in incompatibility with the previous versions.
For more details, refer to the HP aC++ World Wide Web Homepage at the
following URL and choose "Compatibility between Releases:" http://devresource.hp.com/devresource/Tools/cpp/index.html
Floating-Point Exceptions Must be Raised Prior to Entering Library Routines
Programmers who use floating-point arithmetic are reminded to insure 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 the
floating-point exception, interrupting the library code rather than the
user code.
This reminder is included since the unwind component of libcl.a and
libunwind.so 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 don't raised
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 versus 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
};
void A::foo() {
return;
}
int main() {
printf("%d\n",sizeof(A));
}
The named return value (NRV) optimization
Syntax: -Wc,-nrv_optimization,[off|on]
Or: +[no}nrv
The above syntax disables (default) or enables the named return value
(NRV) optimization.
The NRV optimization eliminates a copy-constructor call by allocating
a local object of a function directly in the caller's context if that
object is always returned by the function. For example:
struct A {
A(A const&); // copy-constructor
};
A f(A const& x) {
A a(x);
return a; // Will not call the copy constructor if the
} // optimization is enabled.
This optimization will not be performed if the copy-constructor was not
declared by the programmer. Note that although this optimization is allowed
by the ISO/ANSI C++ standard, it may have noticeable side-effects.
Example: aCC -Wc,-nrv_optimization,on app.C
Linker Compatibility Warnings
Beginning with the HP-UX 10.20 release, the linker generates compatibility
warnings. These warnings include HP 9000 architecture issues, as well as
linker features that may change over time. Compatibility warnings
can be turned off with the +v[no]compatwarnings linker option. Also, detailed
warnings can be turned on with the +vallcompatwarnings linker option.
Link time compatibility warnings include the following:
-
Duplicate names found for code and data symbols -- The current linker can
create a program that has a code and data symbol with the same name. In
a future HP-UX release, the linker will adopt a single name space for all
symbols. This means that code and data symbols cannot share the same name.
Renaming the conflicting symbols solves this problem.
-
Unsatisfied symbols found when linking to archive libraries -- If you specify
the -v option with the +vallcompatwarnings option and link to archive libraries,
you may see new warnings.
Chapter 4: Problem Descriptions and Fixes and Known Limitations
This chapter summarizes the known problems and limitations of the current
version of HP aC++ except as otherwise noted.
See the latest "HP-UX Software Status Bulletin" support document for
other known problems.
Known Problems
Customers on support can use the product number to assist them in finding
SSB and SRB reports for HP aC++. The product number you can search
for is B3910BA.
To verify the product number and version for your HP aC++ compiler,
execute the following HP-UX commands:
-
what /opt/aCC/lbin/ctcom
-
what /opt/aCC/bin/aCC
Following are known problems and workarounds.
Object Files Generated at Optimization Level 4
Object files generated by the compiler at optimization level 4, called
intermediate object files, are intended to be temporary files. These
object files contain an intermediate representation of the user code
in a format that is designed for advanced optimizations. Hewlett-Packard
reserves the right to change the format of these files without notice in
any compiler release or patch. Use of intermediate files must be
limited to the compiler that created them. For the same reason, intermediate
object files should not be included into archived libraries that might
be used by different versions of the compiler.
When an incompatible intermediate file is detected, the compiler will
issue a message and terminate.
Lack of support for Precompiled Headers
Use of Precompiled Header files and the "automatic precompiled header"
(+hdr_cache) option in conjunction with Itanium (IPF) is not supported
in this release.
Incompatibilities Between the Standard C++ Library Version 1.2.1 and the
Draft Standard
As the ANSI C++ standard has evolved over time, the Standard C++ Library
has not always kept up. Such is the case for the "times" function
object in the functional header file. In the standard, "times" has
been renamed to "multiplies."
If you want to use "multiplies" in your code, to be compatible with
the ISO/ANSI C++ standard, use a conditional compilation flag on the aCC
command line. For example, for the following program, compile with
the command line:
aCC -D__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL test.c
// test.c
int times; //user defined variable
#include <functional>
// multiplies can be used in
int main() {}
// end of test.c
This flag and the following flags are now automatically set with IPF:
-D_HPACC_THREAD_SAFE_RB_TREE
-D__HPACC_USING_MULTIPLIES_IN_FUNCTIONAL
-D__HPACC_FIX_FUNC_ADAPTER_OPERATOR
-D__HPACC_FULL_ITERATOR_REL_OPS
-D__HPACC_TEMPLATE_PAIR_CTOR
-D__HPACC_MEM_FUN_ADAPTOR
Conflict between macros.h and numeric_limits Class (min and max)
If your code includes /usr/include/macros.h, note that the min and max
macros defined in macros.h conflict with the min and max functions defined
in the numeric_limits class of the Standard C++ Library. The following
code, for example, would generate a compiler Error 134:
numeric_limits<unsigned int>::max();
If you must use the macros.h header, try undefining the macros that conflict:
...
#include <macros.h>
#undef max
#undef min
...
Known Limitations
Some of these limitations will be removed in future releases of HP aC++.
Please be aware that some of these limitations are platform-specific.
-
Limitation when Unloading Shared Libraries in an Application
Normally, at program termination (exit) or at a call to shl_unload()
or dlclose(), all explicitly loaded libraries are closed automatically
and static destructors are executed at that time. When an application calls
shl_unload() or dlclose() and that causes libcsup
to be unloaded, it fails when it executes static destructors at program
termination. This causes a program abort, since
related code and data of libcsup are no longer present.
See defect JAGaa86491.
-
HP aC++ does not support large files (i.e., greater than 2 GB) with <iostream.h>
or <iostream>.
-
Known limitations of exception handling features:
-
Interoperability with setjmp/longjmp (undefined by the ISO/ANSI C++ international
standard) is unimplemented. Executing longjmp does not cause any
destructors to be run.
-
If an unhandled exception is thrown during program initialization phase
(that is, before the main program begins execution) destructors for some
constructed objects may not be run.
-
Symbolic debugging information is not always emitted for objects which
are not directly referenced. For instance, if a pointer to an object
is used but no fields are ever referenced, then HP aC++ only emits symbolic
debug information for the pointer type and not for the type of object that
the pointer points to. For instance, use of Widget * only emits debug
information for the pointer type Widget * and not for Widget. If
you wish such information, you can create an extra source file which defines
a dummy function that has a parameter of that type (Widget) and link it
into the executable program.
-
Known limitations of signal handling features:
-
Throwing an exception from a signal handler is not supported, since a signal
can occur anyplace, including optimized regions of code in which the values
of destructable objects are temporarily held in registers. Exception
handling depends on destructable objects being up-to-date in memory, but
this condition is only guaranteed at call sites.
-
Issuing a longjmp in a signal handler is not recommended for the same reason
that throwing an exception is not supported. The signal handler interrupts
processing of the code resulting in undefined data structures with unpredictable
results.
-
Source-level debugging of C++ shared libraries is supported. However, there
are limitations related to debugging C++ shared libraries, generally 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.
Refer also to the Software Status Bulletin for additional details.
-
Instantiation of shared objects with virtual functions in shared memory
is not supported.
-
Using shl_load(3X) with Library-Level Versioning
Once library-level versioning is used, calls to shl_load() (see shl_load(3X))
should specify the actual version of the library that is to be loaded.
For example, if libA.so is now a symbolic link to libA.so.1, then calls
to dynamically load this library should specify the latest version available
when the application is compiled, such as:
shl_load("libA.so.1", BIND_DEFERRED, 0);
This will insure 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() (see malloc(3C)). The
syntax is: void *alloca(size_t <size>);
alloca() allocates space from the stack of the caller for a block of at
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.
To use this function, you must use the <alloca.h> header file.