aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-06-02 00:11:05 +0200
committerMarc Poulhiès <poulhies@adacore.com>2023-06-20 09:30:50 +0200
commiteb5c593cab9c8e88bc83767b738307e31285c733 (patch)
treeaca3d219497d64754f04abe207f5172018f1818d /gcc/ada/doc
parent8912b95779dd233fb3a8c8b4dda033ed7b50be31 (diff)
downloadgcc-eb5c593cab9c8e88bc83767b738307e31285c733.zip
gcc-eb5c593cab9c8e88bc83767b738307e31285c733.tar.gz
gcc-eb5c593cab9c8e88bc83767b738307e31285c733.tar.bz2
ada: Fix couple of issues in documentation of overflow checking
There is still a mention of the defunct CHECKED mode and the Default Settings paragraph is confusing with regard to the -gnato switch. gcc/ada/ * doc/gnat_ugn/gnat_and_program_execution.rst (Overflows in GNAT) <Default Settings>: Remove obsolete paragraph about -gnato. <Implementation Notes>: Replace CHECKED with STRICT. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst23
1 files changed, 3 insertions, 20 deletions
diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
index 9eb6b1c..62abca2 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -2925,25 +2925,8 @@ The default mode for overflow checks is
General => Strict
-which causes all computations both inside and outside assertions to use
-the base type.
-
-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.
-
-.. Sphinx allows no emphasis within :index: role. As a workaround we
- point the index to "switch" and use emphasis for "-gnato".
-
-The :index:`switch <-gnato (gcc)>` :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.
+which causes all computations both inside and outside assertions to use the
+base type, and is equivalent to :switch:`-gnato` (with no digits following).
The pragma ``Suppress (Overflow_Check)`` disables overflow
checking, but it has no effect on the method used for computing
@@ -2964,7 +2947,7 @@ reasonably efficient, and can be generally used. It also helps
to ensure compatibility with code imported from some other
compiler to GNAT.
-Setting all intermediate overflows checking (``CHECKED`` mode)
+Setting all intermediate overflows checking (``STRICT`` mode)
makes sense if you want to
make sure that your code is compatible with any other possible
Ada implementation. This may be useful in ensuring portability