Microchip Technology XC8 Standard Compiler (Workstation) SW006021-1 SW006021-1 User Manual

Product codes
SW006021-1
Page of 518
MPLAB
®
 XC8 C Compiler User’s Guide
DS52053B-page 116
 2012 Microchip Technology Inc.
4.8.59
--WARN: Set Warning Level
The --WARN option is used to set the compiler warning level threshold. Allowable warn-
ing levels range from -9 to 9. The warning level determines how pedantic the compiler 
is about dubious type conversions and constructs. Each compiler warning has a des-
ignated warning level; the higher the warning level, the more important the warning 
message. If the warning message’s warning level exceeds the set threshold, the warn-
ing is printed by the compiler. The default warning level threshold is 0 and will allow all 
normal warning messages.
Use this option with care as some warning messages indicate code that is likely to fail 
during execution, or compromise portability.
Warning message can be individually disabled with the --MSGDISABLE option, see 
Section 4.8.38 “--MSGDISABLE: Disable Warning Messages”. See also 
Section 4.6 “Compiler Messages” for full information on the compiler’s messaging 
system.
4.8.60
--WARNFORMAT: Set Warning Message Format
This option sets the format of warning messages produced by the compiler. See 
Section 4.8.28 “--ERRFORMAT: Define Format for Compiler Messages” for more 
information on this option. For full information on the compiler’s messaging system, see 
Section 4.6 “Compiler Messages”.
If you are compiling using MPLAB IDE, the format of the compiler messages is auto-
matically configured to what the IDE expects. It recommended that you do not adjust 
the message formats if compiling using this IDE.