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

+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 -g option 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 -g0 option causes the compiler to generate full debug information for the debugger.
To suppress expansion of inline functions, use the +d option.
-g1
Like the -g option, the -g1 option 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.
Differences Between -g, -g0, and -g1 Options
The -g, -g0, and -g1 options generate debug information. The difference is that the
-g0 option emits full debug information about every class referenced in a file, which
can result in some redundant information.
The -g and -g1 options emit a subset of this debug information, thereby decreasing the
size of your object file. If you compile your entire application with -g or -g1, no
debugger functionality is lost.
NOTE: If you compile part of an application with -g or -g1 and part with debug off,
(that is, with neither the -g, the -g0, nor the -g1 option) the resulting executable may
not contain complete debug information. You will still be able to run the executable, but
in the debugger, some classes may appear to have no members.
When to use -g, -g0, and -g1
Use -g or -g1 when you are compiling your entire application with debug on and your
application is large, for example, greater than 1 MB.
Use -g0 when either of the following is true:
You are compiling only a portion of your application with debug on, for example,
a subset of the files in your application.
You are compiling your entire application with debug on and your application is
not very large, for example, less than 1 MB.
40 Command-Line Options