6.1.9.18 Errorlevel Directive

The ERRORLEVEL directive can be used to control all error, warning, and advisory messages issued by the PIC Assembler.

The directive takes a comma-separated list of arguments, where each argument has the following meaning.

ArgumentAffectPragma equivalent
0Enables all advisory and warning messages
1Disables all advisory messages
2Disables all advisory and warning messages
-msgDisables the indicated advisory or warning message number. If msg is a warning that was promoted to an error, it will be disabled. If msg is an error message, the assembler will issue an error.#pragma warning disable msg
+msgEnables the indicated advisory or warning message number. If msg is an error message, then it is ignored.#pragma warning enable msg
!msgPromotes the indicated warning message number to an error. If msg is not a warning, then the option is ignored. If msg was previously disabled, the message will remain suppressed. If a disabled msg is later re-enabled, the warning will be issued as an error, as required.#pragma warning error msg
pushPreserve the current state of warning messages.#pragma warning push
popRestore the state of the warning messages to that last pushed.#pragma warning pop

For example, ERRORLEVEL -1522 will disable any warning message numbered 1522 produced by the assembler.

Error messages cannot be disabled using this directive.