maxerr

Option Type Default Value #pragma options C C++
-qoption nomaxerr - x x

Syntax

    -qmaxerr=num:[sev_level] | -qnomaxerr

Purpose
Instructs the compiler to halt compilation when num errors of severity sev_level or higher is reached.

Notes
num must be an integer. sev_level must be one of the following:

sev_level Description
i Informational
w Warning
e Error
s Severe error

If no value is specified for sev_level, the current value of the -qhalt option is used. The default value for -qhalt is s (severe error).

If the -qmaxerr option is specified more than once, the -qmaxerr option specified last determines the action of the option. If both the -qmaxerr and -qhalt options are specified, the -qmaxerr or -qhalt option specified last determines the severity level used by the -qmaxerr option.

An unrecoverable error occurs when the number of errors reached the limit specified. The error message issued is similar to:

1506-672 (U) The number of errors has reached the limit of ...

If -qnomaxerr is specified, the entire source file is compiled regardless of how many errors are encountered.

Diagnostic messages may be controlled by the -qflag option.

Examples

  1. To stop compilation of myprogram.c when 10 warnings are encounted, enter the command:
xlC myprogram.c -qmaxerr=10:w
  1. To stop compilation of myprogram.c when 5 severe errors are encounted, assuming that the current -qhalt option value is S (severe), enter the command:
xlC myprogram.c -qmaxerr=5
  1. To stop compilation of myprogram.c when 3 informationals are encountered, enter the command:
xlC myprogram.c -qmaxerr=3:i

or:

xlC myprogram.c -qmaxerr=5:w qmaxerr=3 -qhalt=i


List of Batch Compiler Options and Their Defaults
Options that Specify Compiler Output
Message Severity Levels and Compiler Response
Equivalent Batch Compile-Link and Incremental Build Options