-qhalt
Category
Pragma equivalent
#pragma options halt
Purpose
Stops compilation before producing any object, executable, or assembler source files if the maximum severity of compile-time messages equals or exceeds the severity you specify.
Syntax
-qhalt syntax (for C) .-s-. >>- -qhalt--=--+-i-+------------------------------------------->< +-w-+ '-e-'
Defaults
-qhalt=s
Parameters
- i
- Specifies that compilation is to stop for all types of errors: warning, error and informational. Informational diagnostics (I) are of the lowest severity.
- w
- Specifies that compilation is to stop for warnings (W) and all types of errors.
- e
- Specifies that compilation is to stop for errors (E), severe errors (S), and unrecoverable errors (U).
- s
- Specifies that compilation is to stop for severe errors (S) and unrecoverable errors (U).
Usage
When the compiler stops as a result of the halt option, the compiler return code is nonzero. For a list of return codes, see Compiler return codes.
When -qhalt is specified more than once, the lowest severity level is used.
Diagnostic messages may be controlled by the -qflag option.
You can also instruct the compiler to stop compilation based on the number of errors of a type of severity by using the -qmaxerr option, which overrides -qhalt.
You can also use the -qhaltonmsg option to stop compilation according to error message number.
Predefined macros
None.
Examples
To compile myprogram.c so
that compilation stops if a warning or higher level message occurs,
enter:
xlc myprogram.c -qhalt=w