Customizable compiler-message severities
To customize compiler-message severities, you need to understand the possible severities of compiler diagnostic messages, the levels or categories of FIPS messages, and the permitted customizations of message severities.
The possible severity codes for compiler diagnostic messages are described in the related reference about severity codes.
The
eight categories of FIPS (FLAGSTD
) messages are shown
in the following table. The category of any given FIPS message is
passed as a numeric code to the MSGEXIT module. Those numeric codes
are shown in the second column.
FIPS level or category | Numeric code | Description |
---|---|---|
D | 81 | Debug module level 1 |
E | 82 | Extension (IBM®) |
H | 83 | High level |
I | 84 | Intermediate level |
N | 85 | Segmentation module level 1 |
O | 86 | Obsolete elements |
Q | 87 | High-level and obsolete elements |
S | 88 | Segmentation module level 2 |
FIPS messages have an implied severity of zero (severity I).
Permitted message-severity customizations:
You can change the severity of a compiler message in the following ways:
- Severity-I and severity-W compiler diagnostic messages, and FIPS
messages, can be changed to have any severity from I through S.
Assigning a severity to a FIPS message converts the FIPS message to a diagnostic message of the assigned severity.
As examples, you can:- Lower an optimizer warning to severity I.
- Disallow
REDEFINING
a smaller item with a larger item by raising the severity of message 1154. - Disallow complex
OCCURS DEPENDING ON
by changing FIPS message 8235 from a category-E FIPS message to a severity-S compiler diagnostic message.
- Severity-E messages can be raised to severity S, but not lowered to severity I or W, because an error condition has occurred in the program.
- Severity-S and severity-U messages cannot be changed to have a different severity.
- I, W, and FIPS messages can be suppressed.
- E and S messages cannot be suppressed.