aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2022-03-16 14:42:14 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2022-05-17 08:25:40 +0000
commit8fc021c0988113e1fcc5ec026f2382b074894e95 (patch)
treeb83e004d792eb1eba5a7559918c2ba7b89b90b1f /gcc/ada/doc
parent7cff43618e6f300915ff9061608a974728315146 (diff)
downloadgcc-8fc021c0988113e1fcc5ec026f2382b074894e95.zip
gcc-8fc021c0988113e1fcc5ec026f2382b074894e95.tar.gz
gcc-8fc021c0988113e1fcc5ec026f2382b074894e95.tar.bz2
[Ada] Fix documentation of using attribute Loop_Entry in pragmas
Attribute Loop_Entry was initially only allowed to appear in pragmas Loop_Variant and Loop_Invariant. Then it was also allowed to appear in pragmas Assert, Assert_And_Cut and Assume, but this change was not reflected in the GNAT RM. gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Loop_Entry): Mention pragmas Assert, Assert_And_Cut and Assume; refill. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst11
1 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
index dc5a1ab..1b4f4fe 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
@@ -629,10 +629,13 @@ to the value an expression had upon entry to the subprogram. The
relevant loop is either identified by the given loop name, or it is the
innermost enclosing loop when no loop name is given.
-A ``Loop_Entry`` attribute can only occur within a
-``Loop_Variant`` or ``Loop_Invariant`` pragma. A common use of
-``Loop_Entry`` is to compare the current value of objects with their
-initial value at loop entry, in a ``Loop_Invariant`` pragma.
+A ``Loop_Entry`` attribute can only occur within an ``Assert``,
+``Assert_And_Cut``, ``Assume``, ``Loop_Variant`` or ``Loop_Invariant`` pragma.
+In addition, such a pragma must be one of the items in the sequence
+of statements of a loop body, or nested inside block statements that
+appear in the sequence of statements of a loop body.
+A common use of ``Loop_Entry`` is to compare the current value of objects with
+their initial value at loop entry, in a ``Loop_Invariant`` pragma.
The effect of using ``X'Loop_Entry`` is the same as declaring
a constant initialized with the initial value of ``X`` at loop