HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)

The -z option disallows dereferencing of null pointers at run time.
Fatal errors result if null pointers are dereferenced. If you attempt to dereference a null
pointer, a SIGSEGV error occurs at run time.
Example:
aCC -z file.C
The above command compiles file.C and generates code to disallow dereferencing
of null pointers.
For more information, see signal(2) and signal(5) manpages.
-Z
-Z
The -Z option allows dereferencing of null pointers at run time. This is the default. The
value of a dereferenced null pointer is zero.
Code Optimizing Options
Optimization options can be used to improve the execution speed of programs compiled
with the HP compiler.
To use optimization, first specify the appropriate basic optimization level (+O1, +O2,
+O3, or +O4) on the command line followed by one or more finer or more precise options
when necessary.
For more information and examples, refer to Chapter 7: “Optimizing HP aC++ Programs”
(page 194).
This section discusses the following topics:
“Basic Optimization Level Options” (page 63)
Additional Optimization Options for Finer Control” (page 66)
Advanced +Ooptimization Options” (page 69)
“Profile-Based Optimization Options” (page 78)
“Displaying Optimization Information” (page 79)
Basic Optimization Level Options
The following options allow you to specify the basic level of optimization.
Compiling files at optimization level 2 ("-O" or "+O2") and above increases the amount
of virtual memory needed by the compiler. In cases where very large functions or files
are compiled at +O2, or in cases where aggressive (+O3 and above) optimization is
used, ensure that the maxdsiz kernel tunable is set appropriately on the machine where
compilation takes place.
Code Optimizing Options 63