Next: , Previous: , Up: Interpreting Error Messages   [Contents][Index]


4.4.4 Error Severity

There are three levels of compiler error severity:

Error

This severity is used when the compiler encounters a problem serious enough to prevent normal processing of a form. Instead of compiling the form, the compiler compiles a call to error. Errors are used mainly for signaling syntax errors. If an error happens during macroexpansion, the compiler will handle it. The compiler also handles and attempts to proceed from read errors.

Warning

Warnings are used when the compiler can prove that something bad will happen if a portion of the program is executed, but the compiler can proceed by compiling code that signals an error at runtime if the problem has not been fixed:

  • Violation of type declarations, or
  • Function calls that have the wrong number of arguments or malformed keyword argument lists, or
  • Referencing a variable declared ignore, or unrecognized declaration specifiers.

In the language of the Common Lisp standard, these are situations where the compiler can determine that a situation with undefined consequences or that would cause an error to be signaled would result at runtime.

Note

Notes are used when there is something that seems a bit odd, but that might reasonably appear in correct programs.

Note that the compiler does not fully conform to the proposed X3J13 cleanup “compiler-diagnostics”. Errors, warnings and notes mostly correspond to errors, warnings and style-warnings, but many things that the cleanup considers to be style-warnings are printed as warnings rather than notes. Also, warnings, style-warnings and most errors aren’t really signaled using the condition system.


Next: Errors During Macroexpansion, Previous: The Processing Path, Up: Interpreting Error Messages   [Contents][Index]