-Werror (-qhalt)

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

Read syntax diagramSkip visual syntax diagram
>>- -Werror----------------------------------------------------><

Read syntax diagramSkip visual syntax diagram
>>- -qhalt--=w-------------------------------------------------><

Defaults

By default, -Werror (-qhalt=w) is not enabled.

Parameters

w
Specifies that compilation is to stop for warnings (W) and all types of errors.

Predefined macros

None.

Examples

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


Voice your opinion on getting help information Ask IBM compiler experts a technical question in the IBM XL compilers forum Reach out to us