Next: Understanding Compiler Diagnostics, Previous: Controlling Verbosity, Up: Diagnostic Messages

#### 4.1.2 Diagnostic Severity

There are four levels of compiler diagnostic severity:

1. error
2. warning
3. style warning
4. note

The first three levels correspond to condition classes which are defined in the ANSI standard for Common Lisp and which have special significance to the `compile` and `compile-file` functions. These levels of compiler error severity occur when the compiler handles conditions of these classes.

The fourth level of compiler error severity, note, corresponds to the `sb-ext:compiler-note`, and is used for problems which are too mild for the standard condition classes, typically hints about how efficiency might be improved. The `sb-ext:code-deletion-note`, a subtype of `compiler-note`, is signalled when the compiler deletes user-supplied code after proving that the code in question is unreachable.

Future work for SBCL includes expanding this hierarchy of types to allow more fine-grained control over emission of diagnostic messages.

— Condition: sb-ext:compiler-note

> Class precedence list: `compiler-note, condition, t`

> Root of the hierarchy of conditions representing information discovered by the compiler that the user might wish to know, but which does not merit a `style-warning` (or any more serious condition).

— Condition: sb-ext:code-deletion-note

> Class precedence list: `code-deletion-note, compiler-note, condition, t`

> A condition type signalled when the compiler deletes code that the user has written, having proved that it is unreachable.