Purpose
Controls the generation of diagnostic messages.
The pragma allows you to specify a minimum severity level
for a message for it to display, or allows you to enable or disable
a specific message regardless of the prevailing report level.
Syntax
.-I-.
>>-#--pragma--report--(--+-level--,--+-E-+------------------+--)-><
| '-W-' |
+-+-enable--+--,--"message_number"-+
| '-disable-' |
'-pop------------------------------'
Defaults
The default report level is Informational
(I), which displays messages of all types.
Parameters
- level
- Indicates that the pragma is set according to the minimum severity
level of diagnostic messages to display.
- E
- Indicates that only error messages will display. Error messages
are of the highest severity. This is equivalent to the FLAG(E) compiler option.
- W
- Indicates that warning and error messages will display. This is
equivalent to the FLAG(W) compiler option.
- I
- Indicates that all diagnostic messages will display: warning,
error and informational messages. Informational messages are of the
lowest severity. This is equivalent to the FLAG(I) compiler option.
- enable
- Enables the specified "message_number".
- disable
- Disables the specified "message_number".
- "message_number"
- Represents a message identifier, which consists of a prefix followed
by the message number in quotation marks; for example, "CCN1004".
Note: You must use quotation marks with message_number as in the
preceding example "CCN1004".
- pop
- Reverts the report level to that which was previously in effect.
If no previous report level has been specified, a warning is issued,
and the report level remains unchanged.
Usage
The pragma takes precedence over most compiler options.
For example, if you use #pragma report to disable a compiler
message, that message will not be displayed with any FLAG compiler option setting. Similarly, if you specify the SUPPRESS compiler option
for a message but also specify #pragma report(enable) for the
same message, the pragma will prevail.
Related information
- The FLAG option in the z/OS XL C/C++ User's Guide.