-qflag

Category

Listings, messages, and compiler information

Pragma equivalent

#pragma options flag

Purpose

Limits the diagnostic messages to those of a specified severity level or higher.

The messages are written to standard output and, optionally, to the listing file if one is generated.

Syntax

Read syntax diagramSkip visual syntax diagram
-qflag syntax – C

                  (1)             (2)        
               .-------i-.     .-------i-.   
>>- -qflag--=--+-w-------+--:--+-w-------+---------------------><
               +-e-------+     +-e-------+   
               '-s-------'     '-s-------'   

Notes:
  1. Minimum severity level of messages reported in listing
  2. Minimum severity level of messages reported on terminal

Defaults

-qflag=i : i, which shows all compiler messages

Parameters

i
Specifies that all diagnostic messages are to display: warning, error and informational messages. Informational messages (I) are of the lowest severity.
w
Specifies that warning (W) and all types of error messages are to display.
e
Specifies that only error (E), severe error (S), and unrecoverable error (U) messages are to display.
s
Specifies that only severe error (S) and unrecoverable error (U) messages are to display.

Usage

You must specify a minimum message severity level for both listing and terminal reporting.

Note that using -qflag does not enable the classes of informational message controlled by the -qinfo option; see -qinfo for more information.

The -qhaltonmsg option has precedence over the -qflag option. If both -qhaltonmsg and -qflag are specified, messages that are not selected by -qflag are also printed.

Predefined macros

None.

Examples

To compile myprogram.c so that the listing shows all messages that were generated and your workstation displays only error and higher messages (with their associated information messages to aid in fixing the errors), enter:

xlc myprogram.c -qflag=i:e

Related information