Next: , Previous: Pragma Assert, Up: Implementation Defined Pragmas


Pragma Assertion_Policy

Syntax:

     pragma Assertion_Policy (CHECK | DISABLE | IGNORE);

If the argument is CHECK, then pragma Assert is enabled. If the argument is IGNORE, then pragma Assert is ignored. This pragma overrides the effect of the -gnata switch on the command line.

The implementation defined policy DISABLE is like IGNORE except that it completely disables semantic checking of the argument to pragma Assert. This may be useful when the pragma argument references subprograms in a with'ed package which is replaced by a dummy package for the final build.

Note: this is a standard language-defined pragma in versions of Ada from 2005 on. In GNAT, it is implemented in all versions of Ada, and the DISABLE policy is an implementation-defined addition.