Attribute ‘warning disable’, attribute ‘warning restore’¶
This pragma causes certain warnings to be suppressed. The warning restore
pragma causes a suppressed message to be reactivated.
Syntax:
{warning disable <compiler ID>}
{warning restore <compiler ID>}
<compiler ID>
: ID located at the beginning of an error or a warning message.
Example
Compiler message:
typify code ...
C0196: Implicit conversion from unsigned Type 'UINT' to signed Type 'INT' : possible change of sign
Compile complete -- 0 errors
Applying the pragma to a variable declaration:
VAR
{warning disable C0195}
test1 : UINT := -1;
{warning restore C0195}
test2 : UINT := -1;
END_VAR
test1
does not generate an error message, test2
generates an error message.