-qhalt

Description

Instructs the compiler to stop after the compilation phase when it encounters errors of specified severity or greater.

Syntax

Read syntax diagramSkip visual syntax diagram                  (2)
               .--------e-.
               |  (1)     |
               +--------s-+
>>- -qhalt--=--+-i--------+------------------------------------><
               +-w--------+
               '-u--------'

Notes:
  1. Default for C++ compilations.
  2. Default for C compilations.

where severity levels in order of increasing severity are:

severity Description
i Information
w Warning
e Error (C only)
s Severe error
u Unrecoverable error

See also #pragma options.

Notes

When the compiler stops as a result of the -qhalt option, the compiler return code is nonzero.

When -qhalt is specified more than once, the lowest severity level is used.

The -qhalt option can be overridden by the -qmaxerr option.

Diagnostic messages may be controlled by the -qflag option.

Example

To compile myprogram.c so that compilation stops if a warning or higher level message occurs, enter:

xlc myprogram.c -qhalt=w

Related information