Skip to main content

IAR Embedded Workbench for RL78 5.20

error

In this section:
Syntax
#pragma error message
Parameters

message

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\"")
#endif

If FOO_AVAILABLE is zero, an error will be signaled if the FOO macro is used in actual source code.