Next: Pragma Assume_No_Invalid_Values, Previous: Pragma Assert, Up: Implementation Defined Pragmas
pragma Assertion_Policy (CHECK | DISABLE | IGNORE);
If the argument is CHECK, then assertions are enabled.
If the argument is IGNORE, then assertions are ignored.
This pragma overrides the effect of the -gnata switch on the
command line.
Assertions are of three kinds:
Assert.
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.