Keil Logo

Suppressing armcc error and warning messages

1.1 Suppressing armcc error and warning messages

You can use command-line options to control the severity of the diagnostic messages that the compiler produces.

The compiler normally warns of potential portability problems and other hazards.
When porting legacy code (for example, in old-style C) to the ARM® Compiler, many warnings might be reported. It might be tempting to disable all such warnings with –W. ARM recommends however that for portability reasons, you change the code to make it ANSI compatible rather than suppressing the warnings.
Some warnings are suppressed by default. To override this, use the --strict_warnings switch to enable all suppressed warnings.
By default, optimization messages, for example most of the messages between 1593 and 2159, are not warnings. To treat optimization messages as warnings, use the --diag_warning=optimizations option.
Non-ConfidentialPDF file icon PDF versionARM DUI0591F
Copyright © 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.