The language value (refer to environ(5) for the LANG environment variable) is used to initialize the correct tables for interpreting comments, string literals, and character constants. The language value is also used to build the path name to the proper message catalog.

For more information and description of the NLS model, refer to hpnls, lang, and environ in HP-UX Reference Manual.

Handling Null Pointers Options

The following options allow dereferencing of null pointers.

-z

-z

The -zoption 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 -Zoption 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 156).

This section discusses the following topics:

“Basic Optimization Level Options” (page 53)

“Additional Optimization Options for Finer Control” (page 55)

“Advanced +Ooptimization Options” (page 57)

“Profile-Based Optimization Options” (page 64)

“Displaying Optimization Information” (page 65)

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.

HP recommends a setting of 0x100000000, or 4 GB (the default for this parameter is 0x100000000, or 4 GB) for maxdsiz_64bit in such cases. Updating the maxdsiz_64bit

Handling Null Pointers Options 53