Table 3 Size and Alignment of HP Compiler Data Types (continued)

Data Type

Size (in bytes)

Alignment

***struct and union alignment are same and follow strict alignment of any member. Padding is done to a multiple of the alignment size.

-fshort-enums

cc-Agcc -Wc,--fshort-enums foo.c aCC -Ag++ -Wc,--fshort-enums foo.c

The -fshort-enumsoption is used with the -Agccor -Ag++options to cause each enum type to be represented using the smallest integer type that is capable of representing all values of the enum type. Because it changes the representation of types, the code generated is not binary compatible with code compiled without the option. The primary use of this option is for compatibility with gcc, but it can provide performance improvement to applications that can accept the binary incompatibility.

+unum

+unum

The +unum option allows pointers to access non-natively aligned data. This option alters the way that the compiler accesses dereferenced data. Use of this option may reduce the efficiency of generated code. Specify num as 1, 2, or 4, as follows:

1 - Assume single byte alignment. Dereferences are performed with a series of single-byte loads and stores.

2 - Dereferences are performed with a series of two-byte loads and stores.

4 - Dereferences are performed with a series of four-byte loads and stores.

Example:

aCC +u1 app.C

Debugging Options

Debugging options enable you to use the HP WDB debugger.

Information on HP WDB is available at this location: http://www.hp.com/go/wdb

+d

The +d option prevents the expansion of inline functions. It is useful when you debug code because breakpoints cannot be set at inline functions. Using the +d option disables all inlining. It is mapped to the +inline_level 0 option.

+expand_types_in_diag

The +expand_types_in_diag option expands typedefs in diagnostics so that both the original and final types are present.

-g

The -goption causes the compiler to generate minimal information for the debugger. It uses an algorithm that attempts to reduce duplication of debug information.

To suppress expansion of inline functions, use the +d option.

-g0

The -g0option causes the compiler to generate full debug information for the debugger.

Debugging Options 35