6.2 Options that change the severity of compiler diagnostic messages

You can change the diagnostic severity of all remarks and warnings, and a limited number of errors.

These options let you change severities:

--diag_error=tag[, tag, ...]

Sets the diagnostic messages that have the specified tag, or tags, to Error severity.

--diag_error=warning

Upgrades all warning messages to Error severity.

--diag_remark=tag[, tag, ...]

Sets the diagnostic messages that have the specified tag, or tags, to Remark severity.

--diag_suppress=tag[, tag, ...]

Suppresses the diagnostic messages that have the specified tag, or tags.

--diag_suppress=optimizations

Suppresses diagnostic messages for high-level optimizations.

--diag_warning=tag[, tag, ...]

Sets the diagnostic messages that have the specified tag, or tags, to Warning severity.

--diag_warning=error

Sets all downgradable error messages to Warning severity.

The format tag[, tag, ...] indicates a comma-separated list of the error messages that you want to change. For example, you might want to change a warning message with the number 1293 to Remark severity, because remarks are not displayed by default.

Note:

tag is the four-digit number, nnnn, with the tool letter prefix, but without the letter suffix indicating the severity.

To do this, use the following command:

armcc --diag_remark=1293 ...

Only errors with a suffix of -D following the error number can be downgraded by changing them into warnings or remarks.

Note:

These options also have pragma equivalents.

The following diagnostic messages can be changed:

  • Messages with the number format #nnnn-D.

  • Warning messages with the number format CnnnnW.

It is also possible to apply changes to optimization messages as a group. For example, --diag_warning=optimizations. By default, optimization messages are remarks.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.