HP C/aC++ for PA-RISC Software manual +Weargs, +Wv, +Wwargs, +wlint, +Wmacro, +wperfadvice

Models: C/aC++ for PA-RISC Software

1 230
Download 230 pages 50.97 Kb
Page 40
Image 40

+We

+We

The +We option interprets all warning and future error messages as errors.

Alternatively you can also use +We[arg1,...argn] option, where arg is a valid compiler warning message number. Use of arg is optional.

+Weargs

+Wearg1[,arg2,..,argn]

The +Weargs option selectively interprets any specified warning or future error messages as errors. arg1 through argn are valid compiler warning message numbers.

Example:

aCC +We 600,829 app.C

+Wv

+Wv[d1,d2,..,dn]

The +Wv option displays the description for diagnostic message numbers d1 through dn.

Specifying this option causes the compiler to emit the descriptive text for the specified dianostics to stderr. This option must not be used with any other compiler options.

If the description for a diagnostic is not available, the compiler emits only the diagnostic with a note that the description is not available.

+Wwargs

+Wwarg1[,arg2,..,argn]

The +Wwargs option selectively treats compiler remarks or discretionary errors as warnings. arg1 through argn are valid compiler message numbers. Conflicts between +W, +Ww, and +We are resolved based on their severity. +We is the highest and +W is the lowest.

+wlint

This option enables several warnings in the compiler that provide lint like functionality. Checks are made for memory leaks, out-of-scope memory access, null pointer dereference, and out-of-bounds access. These compile time diagnostics can be very useful in detecting potential problems in the source code. To disable a specific warning introduced by +wlint, a +Wargs option can be used after the +wlint option.

NOTE: The +wlint option is only supported on Itanium-based systems.

+Wmacro

+Wmacro:MACRONAME:d1,d2,...,dn

The +Wmacro option disables warning diagnostics d1,d2,...,dn in the expansion of macro MACRONAME. If -1 is given as the warning number, then all warnings are suppressed. This option is not applicable to warning numbers greater than 20000. +Wmacro gets higher priority than the other diagnostic-control command-line options that are applicable to the whole source. Diagnostic control pragmas take priority based on where they are placed.

+wperfadvice

+wperfadvice[={1234}]

The +wperfadvice option enables performance advisory messages.

40 Command-Line Options

Page 40
Image 40
HP C/aC++ for PA-RISC Software manual +Weargs, +Wv, +Wwargs, +wlint, +Wmacro, +wperfadvice