halt

Applies to C Applies to C++

Purpose

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

Syntax


Syntax Diagram

Syntax 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 References

Compiler Command Line Options
flag
maxerr
#pragma options IBM Copyright 2003