The #error directive makes the preprocessor issue an error message, regardless of any actual formal error. Its syntax is:
#error [text]
The following example tests whether the standard macro _ _STDC_ _ is defined, and generates an error message if it is not:
#ifndef _ _STDC_ _
#error "This compiler does not conform to the ANSI C standard."
#endifSource: C in a Nutshell - O'Reilly Media
No comments:
Post a Comment