this list can be included in an options file and referenced using the +opts option to avoid listing them all directly on the command line.

Example:

The following command compiles file.C and reports errors but does not report any warnings.

aCC -w file.C

+w

The +w option warns you about all questionable constructs and gives pedantic warnings. +w enables all checks except for the +wsecurity, +wendian, +wperfadvice, and+wlock warnings. Those need to be enabled explicitly if needed. The default is to warn only about constructs that are almost certainly problems.

For example, this option warns you when calls to inline functions cannot be expanded inline.

The following command compiles file.C and warns about both questionable and problematic constructs:

aCC +w file.C

NOTE: This option is equivalent to the +w1 option of legacy HP C.

+wn

The +wn option specifies the level of the warnings messages.

+w{123}

The value of n can be one of the following:

1All warnings are issued. This includes low level warnings that may not indicate anything wrong with the program.

2Only warnings indicating that code generation might be affected are issued. This is equivalent to the compiler default without the -woptions.

3No warnings are issued. This is equivalent to the -woption. This option is the same as -W c and-wn.

+Wargs

+Warg1[,arg2,..argn]

The +Wargs option selectively suppresses any specified warning messages.

Arguments arg1 through argn are valid compiler warning message numbers.

Example:

aCC +W600 app.C

+Wcontext_limit

+Wcontext_limit=num

The +Wcontext_limi option limits the number of instantiation contexts output by the compiler for diagnostics involving template instantiations. At most num outermost contexts and num innermost contexts are shown. If there are more than 2*num relevant contexts, the additional contexts are omitted.

Omitted contexts are replaced by a single line separating the outermost num contexts from the innermost num contexts, and indicating the number of contexts omitted. The default value for num is 5. A value of 0 removes the limit.

Error Handling 39

Page 39
Image 39
HP C/aC++ for PA-RISC Software manual +wn, +Wargs, +Wcontextlimit