Keil Logo

WARNINGLEVEL Compiler Directive

Abbreviation

WL

Arguments

A number from 0-3.

Default

WARNINGLEVEL (2)

µVision

Options — C251 — Warnings.

Description

The WARNINGLEVEL directive suppresses certain compiler warnings based on the level of the warning. Refer to Error Messages for a complete list of compiler warnings.

Warning Level Description
0 Disables most compiler warnings.
1 Lists only those warnings which may generate incorrect code.
2 (Default) Lists warnings about unused variables, expressions, or labels.
3 Lists all warnings.

 

  • Warnings in the range 300-399 are originated in the preprocessor and cannot be disabled.
See Also

WARNING

Example
C251 SAMPLE.C WL (1)

#pragma WARNINGLEVEL (0)

Related Knowledgebase Articles

  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.