HP aC++/HP C A.06.25 Programmer's Guide
Handling Null Pointers Options
The following options allow dereferencing of null pointers.
-z
-z
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 205).
This section discusses the following topics:
• “Basic Optimization Level Options” (page 68)
• “Additional Optimization Options for Finer Control” (page 71)
• “Advanced +Ooptimization Options” (page 75)
• “Profile-Based Optimization Options” (page 87)
• “Displaying Optimization Information” (page 88)
Basic Optimization Level Options
The following options allow you to specify the basic level of optimization.
68 Command-Line Options