Keil Logo

Options that change the severity of compiler diagnostic messages

5.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 DUI0375H
Copyright © 2007, 2008, 2011, 2012, 2014-2016 ARM. All rights reserved. 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.