Whole document tree
1.5.6 The `#error' and `#warning' DirectivesThe directive `#error' causes the preprocessor to report a fatal error. The rest of the line that follows `#error' is used as the error message. The line must consist of complete tokens. You would use `#error' inside of a conditional that detects a combination of parameters which you know the program does not properly support. For example, if you know that the program will not run properly on a Vax, you might write
See section 1.4.3.2 Nonstandard Predefined Macros, for why this works. If you have several configuration parameters that must be set up by the installation in a consistent way, you can use conditionals to detect an inconsistency and report it with `#error'. For example,
The directive `#warning' is like the directive `#error', but causes the preprocessor to issue a warning and continue preprocessing. The rest of the line that follows `#warning' is used as the warning message. You might use `#warning' in obsolete header files, with a message directing the user to the header file which should be used instead. This document was generated by root on January, 30 2002 using texi2html |