Keil™, An ARM® Company

Cx51 User's Guide

#error

The #error directive causes the preprocessor to emit an error message. The rest of the line is the error message.

#error "message"

You may use #error inside a condition that detects an error condition. For example, the following outputs an error message if __KEIL__ is not defined.

#ifndef __KEIL__
#error "This code will not work without the Keil Compiler."
#endif