-qflag
Pragma equivalent
#pragma options flag, #pragma report (C++ only)
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
-qflag syntax – C (1) (2) .-------i-. .-------i-. >>- -qflag--=--+-w-------+--:--+-w-------+--------------------->< +-e-------+ +-e-------+ '-s-------' '-s-------'
- Minimum severity level of messages reported in listing
- Minimum severity level of messages reported on terminal
-qflag syntax – C++ (1) .-------i-. >>- -qflag--=--+-w-------+--+----------------+----------------->< '-s-------' | (2) | | .-------i-. | '-:--+-w-------+-' '-s-------'
- Minimum severity level of messages reported in listing
- 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.
Specifies that only severe error (S) messages are
to display.
Usage
You must specify a minimum
message severity level for both listing and terminal reporting.
You must specify a
minimum message severity level for the listing. If you do not specify
a suboption for the terminal, the compiler assumes the same severity
as for the listing.
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



