Next: , Previous: Specifying the Desired Mode, Up: Overflow Check Handling in GNAT


D.4 Default Settings

The default mode for overflow checks is

        General => Strict

which causes all computations both inside and outside assertions to use the base type. In addition overflow checks are suppressed.

This retains compatibility with previous versions of GNAT which suppressed overflow checks by default and always used the base type for computation of intermediate results.

The switch -gnato (with no digits following) is equivalent to

        General => Strict

which causes overflow checking of all intermediate overflows both inside and outside assertions against the base type. This provides compatibility with this switch as implemented in previous versions of GNAT.

The pragma Suppress (Overflow_Check) disables overflow checking, but it has no effect on the method used for computing intermediate results.

The pragma Unsuppress (Overflow_Check) enables overflow checking, but it has no effect on the method used for computing intermediate results.