error
In this section:
Syntax
#pragma error messageParameters
| A string that represents the error message. |
Description
Use this pragma directive to cause an error message when it is parsed. This mechanism is different from the preprocessor directive #error, because the #pragma error directive can be included in a preprocessor macro using the _Pragma form of the directive and only causes an error if the macro is used.
Example
#if FOO_AVAILABLE
#define FOO ...
#else
#define FOO _Pragma("error\"Foo is not available\"")
#endifIf FOO_AVAILABLE is zero, an error will be signaled if the FOO macro is used in actual source code.