From: Eric Botcazou <ebotca...@adacore.com>

The current documentation does not reflect the implementation present in
the compiler and contains various other inaccuracies.

gcc/ada/ChangeLog:

        * doc/gnat_rm/gnat_language_extensions.rst
        (Generalized Finalization): Document the actual implementation.
        (No_Raise): Move to separate section.
        * gnat_rm.texi: Regenerate.

Tested on x86_64-pc-linux-gnu, committed on master.

---
 .../doc/gnat_rm/gnat_language_extensions.rst  | 156 ++++------
 gcc/ada/gnat_rm.texi                          | 271 +++++++-----------
 2 files changed, 165 insertions(+), 262 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst 
b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
index 1713f56be3b..0a08a83a5a2 100644
--- a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
+++ b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
@@ -1469,97 +1469,60 @@ that the record type must be a root type, in other 
words not a derived type.
 
 The aspect additionally makes it possible to specify relaxed semantics for
 the finalization operations by means of the ``Relaxed_Finalization`` setting.
-
-Example:
+Here is the archetypal example:
 
 .. code-block:: ada
 
-    type Ctrl is record
-      Id : Natural := 0;
+    type T is record
+      ...
     end record
       with Finalizable => (Initialize           => Initialize,
                            Adjust               => Adjust,
                            Finalize             => Finalize,
                            Relaxed_Finalization => True);
 
-    procedure Adjust     (Obj : in out Ctrl);
-    procedure Finalize   (Obj : in out Ctrl);
-    procedure Initialize (Obj : in out Ctrl);
+    procedure Adjust     (Obj : in out T);
+    procedure Finalize   (Obj : in out T);
+    procedure Initialize (Obj : in out T);
 
-The three procedures have the same profile, taking a single ``in out T``
-parameter.
-
-We follow the same dynamic semantics as controlled objects:
+The three procedures have the same profile, with a single ``in out`` parameter,
+and also have the same dynamic semantics as for controlled types:
 
  - ``Initialize`` is called when an object of type ``T`` is declared without
-   default expression.
+   initialization expression.
 
  - ``Adjust`` is called after an object of type ``T`` is assigned a new value.
 
  - ``Finalize`` is called when an object of type ``T`` goes out of scope (for
-   stack-allocated objects) or is explicitly deallocated (for heap-allocated
-   objects). It is also called when on the value being replaced in an
-   assignment.
+   stack-allocated objects) or is deallocated (for heap-allocated objects).
+   It is also called when the value is replaced by an assignment.
 
-However the following differences are enforced by default when compared to the
-current Ada controlled-objects finalization model:
+However, when ``Relaxed_Finalization`` is either ``True`` or not explicitly
+specified, the following differences are implemented relative to the semantics
+of controlled types:
 
-* No automatic finalization of heap allocated objects: ``Finalize`` is only
-  called when an object is implicitly deallocated. As a consequence, no-runtime
-  support is needed for the implicit case, and no header will be maintained for
-  this in heap-allocated controlled objects.
+* The compiler has permission to perform no automatic finalization of
+  heap-allocated objects: ``Finalize`` is only called when such an object
+  is explicitly deallocated, or when the designated object is assigned a new
+  value. As a consequence, no runtime support is needed for performing
+  implicit deallocation. In particular, no per-object header data is needed
+  for heap-allocated objects.
 
-  Heap-allocated objects allocated through a nested access type definition will
-  hence **not** be deallocated either. The result is simply that memory will be
-  leaked in those cases.
+  Heap-allocated objects allocated through a nested access type will therefore
+  **not** be deallocated either. The result is simply that memory will be 
leaked
+  in this case.
 
-* The ``Finalize`` procedure should have have the :ref:`No_Raise_Aspect` 
specified.
-  If that's not the case, a compilation error will be raised.
+* The ``Adjust`` and ``Finalize`` procedures are automatically considered as
+  having the :ref:`No_Raise_Aspect` specified for them. In particular, the
+  compiler has permission to enforce none of the guarantees specified by the
+  RM 7.6.1 (14/1) and subsequent subclauses.
 
-Additionally, two other configuration aspects are added,
-``Legacy_Heap_Finalization`` and ``Exceptions_In_Finalize``:
-
-* ``Legacy_Heap_Finalization``: Uses the legacy automatic finalization of
-  heap-allocated objects
-
-* ``Exceptions_In_Finalize``: Allow users to have a finalizer that raises 
exceptions
-  **NB!** note that using this aspect introduces execution time penalities.
-
-.. _No_Raise_Aspect:
-
-No_Raise aspect
-----------------
-
-The ``No_Raise`` aspect can be applied to a subprogram to declare that this 
subprogram is not
-expected to raise any exceptions. Should an exception still occur during the 
execution of
-this subprogram, ``Program_Error`` is raised.
-
-New specification for ``Ada.Finalization.Controlled``
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-``Ada.Finalization.Controlled`` is now specified as:
-
-.. code-block:: ada
-
-   type Controlled is abstract tagged null record
-      with Initialize => Initialize,
-         Adjust => Adjust,
-         Finalize => Finalize,
-         Legacy_Heap_Finalization, Exceptions_In_Finalize;
-
-         procedure Initialize (Self : in out Controlled) is abstract;
-         procedure Adjust (Self : in out Controlled) is abstract;
-         procedure Finalize (Self : in out Controlled) is abstract;
-
-
-### Examples
-
-A simple example of a ref-counted type:
+Simple example of ref-counted type:
 
 .. code-block:: ada
 
    type T is record
-      Value : Integer;
+      Value     : Integer;
       Ref_Count : Natural := 0;
    end record;
 
@@ -1571,8 +1534,8 @@ A simple example of a ref-counted type:
    type T_Ref is record
       Value : T_Access;
    end record
-      with Adjust   => Adjust,
-         Finalize => Finalize;
+      with Finalizable => (Adjust   => Adjust,
+                           Finalize => Finalize);
 
    procedure Adjust (Ref : in out T_Ref) is
    begin
@@ -1584,8 +1547,7 @@ A simple example of a ref-counted type:
       Def_Ref (Ref.Value);
    end Finalize;
 
-
-A simple file handle that ensures resources are properly released:
+Simple file handle that ensures resources are properly released:
 
 .. code-block:: ada
 
@@ -1595,51 +1557,47 @@ A simple file handle that ensures resources are 
properly released:
       function Open (Path : String) return File;
 
       procedure Close (F : in out File);
+
    private
       type File is limited record
          Handle : ...;
       end record
-         with Finalize => Close;
+         with Finalizable (Finalize => Close);
+   end P;
 
+Finalizable tagged types
+^^^^^^^^^^^^^^^^^^^^^^^^
 
-Finalized tagged types
-^^^^^^^^^^^^^^^^^^^^^^^
-
-Aspects are inherited by derived types and optionally overriden by those. The
-compiler-generated calls to the user-defined operations are then
-dispatching whenever it makes sense, i.e. the object in question is of
-class-wide type and the class includes at least one finalized tagged type.
-
-However note that for simplicity, it is forbidden to change the value of any of
-those new aspects in derived types.
+The aspect is inherited by derived types and the primitives may be overridden
+by the derivation. The compiler-generated calls to these operations are then
+dispatching whenever it makes sense, i.e. when the object in question is of a
+class-wide type and the class includes at least one finalizable tagged type.
 
 Composite types
 ^^^^^^^^^^^^^^^
 
-When a finalized type is used as a component of a composite type, the latter
-becomes finalized as well. The three primitives are derived automatically
-in order to call the primitives of their components.
-
-If that composite type was already user-finalized, then the compiler
-calls the primitives of the components so as to stay consistent with today's
-controlled types's behavior.
-
-So, ``Initialize`` and ``Adjust`` are called on components before they
-are called on the composite object, but ``Finalize`` is  called on the 
composite
-object first.
+When a finalizable type is used as a component of a composite type, the latter
+becomes finalizable as well. The three primitives are derived automatically
+in order to call the primitives of their components. The dynamic semantics is
+the same as for controlled components of composite types.
 
 Interoperability with controlled types
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-As a consequence of the redefinition of the ``Controlled`` type as a base type
-with the new aspects defined, interoperability with controlled type naturally
-follows the definition of the above rules. In particular:
+Finalizable types are fully interoperable with controlled types, in particular
+it is possible for a finalizable type to have a controlled component and vice
+versa, but the stricter dynamic semantics, in other words that of controlled
+types, is applied in this case.
 
-* It is possible to have a new finalized type have a controlled type
-  component
-* It is possible to have a controlled type have a finalized type
-  component
+.. _No_Raise_Aspect:
 
+No_Raise aspect
+----------------
+
+The ``No_Raise`` aspect can be applied to a subprogram to declare that this
+subprogram is not expected to raise an exception. Should an exception still
+be raised during the execution of the subprogram, it is caught at the end of
+this execution and ``Program_Error`` is propagated to the caller.
 
 Inference of Dependent Types in Generic Instantiations
 ------------------------------------------------------
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index f44260b4a33..0ae1a24dc82 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -942,10 +942,9 @@ Simpler Accessibility Model
 * Subprogram parameters:: 
 * Function results:: 
 
-No_Raise aspect
+Generalized Finalization
 
-* New specification for Ada.Finalization.Controlled: New specification for Ada 
Finalization Controlled. 
-* Finalized tagged types:: 
+* Finalizable tagged types:: 
 * Composite types:: 
 * Interoperability with controlled types:: 
 
@@ -30939,27 +30938,24 @@ that the record type must be a root type, in other 
words not a derived type.
 
 The aspect additionally makes it possible to specify relaxed semantics for
 the finalization operations by means of the @code{Relaxed_Finalization} 
setting.
-
-Example:
+Here is the archetypal example:
 
 @example
-type Ctrl is record
-  Id : Natural := 0;
+type T is record
+  ...
 end record
   with Finalizable => (Initialize           => Initialize,
                        Adjust               => Adjust,
                        Finalize             => Finalize,
                        Relaxed_Finalization => True);
 
-procedure Adjust     (Obj : in out Ctrl);
-procedure Finalize   (Obj : in out Ctrl);
-procedure Initialize (Obj : in out Ctrl);
+procedure Adjust     (Obj : in out T);
+procedure Finalize   (Obj : in out T);
+procedure Initialize (Obj : in out T);
 @end example
 
-The three procedures have the same profile, taking a single @code{in out T}
-parameter.
-
-We follow the same dynamic semantics as controlled objects:
+The three procedures have the same profile, with a single @code{in out} 
parameter,
+and also have the same dynamic semantics as for controlled types:
 
 @quotation
 
@@ -30968,98 +30964,49 @@ We follow the same dynamic semantics as controlled 
objects:
 
 @item 
 @code{Initialize} is called when an object of type @code{T} is declared without
-default expression.
+initialization expression.
 
 @item 
 @code{Adjust} is called after an object of type @code{T} is assigned a new 
value.
 
 @item 
 @code{Finalize} is called when an object of type @code{T} goes out of scope 
(for
-stack-allocated objects) or is explicitly deallocated (for heap-allocated
-objects). It is also called when on the value being replaced in an
-assignment.
+stack-allocated objects) or is deallocated (for heap-allocated objects).
+It is also called when the value is replaced by an assignment.
 @end itemize
 @end quotation
 
-However the following differences are enforced by default when compared to the
-current Ada controlled-objects finalization model:
+However, when @code{Relaxed_Finalization} is either @code{True} or not 
explicitly
+specified, the following differences are implemented relative to the semantics
+of controlled types:
 
 
 @itemize *
 
 @item 
-No automatic finalization of heap allocated objects: @code{Finalize} is only
-called when an object is implicitly deallocated. As a consequence, no-runtime
-support is needed for the implicit case, and no header will be maintained for
-this in heap-allocated controlled objects.
+The compiler has permission to perform no automatic finalization of
+heap-allocated objects: @code{Finalize} is only called when such an object
+is explicitly deallocated, or when the designated object is assigned a new
+value. As a consequence, no runtime support is needed for performing
+implicit deallocation. In particular, no per-object header data is needed
+for heap-allocated objects.
 
-Heap-allocated objects allocated through a nested access type definition will
-hence `not' be deallocated either. The result is simply that memory will be
-leaked in those cases.
+Heap-allocated objects allocated through a nested access type will therefore
+`not' be deallocated either. The result is simply that memory will be leaked
+in this case.
 
 @item 
-The @code{Finalize} procedure should have have the @ref{466,,No_Raise aspect} 
specified.
-If that’s not the case, a compilation error will be raised.
+The @code{Adjust} and @code{Finalize} procedures are automatically considered 
as
+having the @ref{466,,No_Raise aspect} specified for them. In particular, the
+compiler has permission to enforce none of the guarantees specified by the
+RM 7.6.1 (14/1) and subsequent subclauses.
 @end itemize
 
-Additionally, two other configuration aspects are added,
-@code{Legacy_Heap_Finalization} and @code{Exceptions_In_Finalize}:
-
-
-@itemize *
-
-@item 
-@code{Legacy_Heap_Finalization}: Uses the legacy automatic finalization of
-heap-allocated objects
-
-@item 
-@code{Exceptions_In_Finalize}: Allow users to have a finalizer that raises 
exceptions
-`NB!' note that using this aspect introduces execution time penalities.
-@end itemize
-
-@node No_Raise aspect,Inference of Dependent Types in Generic 
Instantiations,Generalized Finalization,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions 
id3}@anchor{467}@anchor{gnat_rm/gnat_language_extensions 
no-raise-aspect}@anchor{466}
-@subsection No_Raise aspect
-
-
-The @code{No_Raise} aspect can be applied to a subprogram to declare that this 
subprogram is not
-expected to raise any exceptions. Should an exception still occur during the 
execution of
-this subprogram, @code{Program_Error} is raised.
-
-@menu
-* New specification for Ada.Finalization.Controlled: New specification for Ada 
Finalization Controlled. 
-* Finalized tagged types:: 
-* Composite types:: 
-* Interoperability with controlled types:: 
-
-@end menu
-
-@node New specification for Ada Finalization Controlled,Finalized tagged 
types,,No_Raise aspect
-@anchor{gnat_rm/gnat_language_extensions 
new-specification-for-ada-finalization-controlled}@anchor{468}
-@subsubsection New specification for @code{Ada.Finalization.Controlled}
-
-
-@code{Ada.Finalization.Controlled} is now specified as:
-
-@example
-type Controlled is abstract tagged null record
-   with Initialize => Initialize,
-      Adjust => Adjust,
-      Finalize => Finalize,
-      Legacy_Heap_Finalization, Exceptions_In_Finalize;
-
-      procedure Initialize (Self : in out Controlled) is abstract;
-      procedure Adjust (Self : in out Controlled) is abstract;
-      procedure Finalize (Self : in out Controlled) is abstract;
-@end example
-
-### Examples
-
-A simple example of a ref-counted type:
+Simple example of ref-counted type:
 
 @example
 type T is record
-   Value : Integer;
+   Value     : Integer;
    Ref_Count : Natural := 0;
 end record;
 
@@ -31071,8 +31018,8 @@ type T_Access is access all T;
 type T_Ref is record
    Value : T_Access;
 end record
-   with Adjust   => Adjust,
-      Finalize => Finalize;
+   with Finalizable => (Adjust   => Adjust,
+                        Finalize => Finalize);
 
 procedure Adjust (Ref : in out T_Ref) is
 begin
@@ -31085,7 +31032,7 @@ begin
 end Finalize;
 @end example
 
-A simple file handle that ensures resources are properly released:
+Simple file handle that ensures resources are properly released:
 
 @example
 package P is
@@ -31094,66 +31041,64 @@ package P is
    function Open (Path : String) return File;
 
    procedure Close (F : in out File);
+
 private
    type File is limited record
       Handle : ...;
    end record
-      with Finalize => Close;
+      with Finalizable (Finalize => Close);
+end P;
 @end example
 
-@node Finalized tagged types,Composite types,New specification for Ada 
Finalization Controlled,No_Raise aspect
-@anchor{gnat_rm/gnat_language_extensions finalized-tagged-types}@anchor{469}
-@subsubsection Finalized tagged types
+@menu
+* Finalizable tagged types:: 
+* Composite types:: 
+* Interoperability with controlled types:: 
+
+@end menu
+
+@node Finalizable tagged types,Composite types,,Generalized Finalization
+@anchor{gnat_rm/gnat_language_extensions finalizable-tagged-types}@anchor{467}
+@subsubsection Finalizable tagged types
 
 
-Aspects are inherited by derived types and optionally overriden by those. The
-compiler-generated calls to the user-defined operations are then
-dispatching whenever it makes sense, i.e. the object in question is of
-class-wide type and the class includes at least one finalized tagged type.
+The aspect is inherited by derived types and the primitives may be overridden
+by the derivation. The compiler-generated calls to these operations are then
+dispatching whenever it makes sense, i.e. when the object in question is of a
+class-wide type and the class includes at least one finalizable tagged type.
 
-However note that for simplicity, it is forbidden to change the value of any of
-those new aspects in derived types.
-
-@node Composite types,Interoperability with controlled types,Finalized tagged 
types,No_Raise aspect
-@anchor{gnat_rm/gnat_language_extensions composite-types}@anchor{46a}
+@node Composite types,Interoperability with controlled types,Finalizable 
tagged types,Generalized Finalization
+@anchor{gnat_rm/gnat_language_extensions composite-types}@anchor{468}
 @subsubsection Composite types
 
 
-When a finalized type is used as a component of a composite type, the latter
-becomes finalized as well. The three primitives are derived automatically
-in order to call the primitives of their components.
+When a finalizable type is used as a component of a composite type, the latter
+becomes finalizable as well. The three primitives are derived automatically
+in order to call the primitives of their components. The dynamic semantics is
+the same as for controlled components of composite types.
 
-If that composite type was already user-finalized, then the compiler
-calls the primitives of the components so as to stay consistent with today’s
-controlled types’s behavior.
-
-So, @code{Initialize} and @code{Adjust} are called on components before they
-are called on the composite object, but @code{Finalize} is  called on the 
composite
-object first.
-
-@node Interoperability with controlled types,,Composite types,No_Raise aspect
-@anchor{gnat_rm/gnat_language_extensions 
interoperability-with-controlled-types}@anchor{46b}
+@node Interoperability with controlled types,,Composite types,Generalized 
Finalization
+@anchor{gnat_rm/gnat_language_extensions 
interoperability-with-controlled-types}@anchor{469}
 @subsubsection Interoperability with controlled types
 
 
-As a consequence of the redefinition of the @code{Controlled} type as a base 
type
-with the new aspects defined, interoperability with controlled type naturally
-follows the definition of the above rules. In particular:
+Finalizable types are fully interoperable with controlled types, in particular
+it is possible for a finalizable type to have a controlled component and vice
+versa, but the stricter dynamic semantics, in other words that of controlled
+types, is applied in this case.
+
+@node No_Raise aspect,Inference of Dependent Types in Generic 
Instantiations,Generalized Finalization,Experimental Language Extensions
+@anchor{gnat_rm/gnat_language_extensions 
id3}@anchor{46a}@anchor{gnat_rm/gnat_language_extensions 
no-raise-aspect}@anchor{466}
+@subsection No_Raise aspect
 
 
-@itemize *
-
-@item 
-It is possible to have a new finalized type have a controlled type
-component
-
-@item 
-It is possible to have a controlled type have a finalized type
-component
-@end itemize
+The @code{No_Raise} aspect can be applied to a subprogram to declare that this
+subprogram is not expected to raise an exception. Should an exception still
+be raised during the execution of the subprogram, it is caught at the end of
+this execution and @code{Program_Error} is propagated to the caller.
 
 @node Inference of Dependent Types in Generic 
Instantiations,External_Initialization Aspect,No_Raise aspect,Experimental 
Language Extensions
-@anchor{gnat_rm/gnat_language_extensions 
inference-of-dependent-types-in-generic-instantiations}@anchor{46c}
+@anchor{gnat_rm/gnat_language_extensions 
inference-of-dependent-types-in-generic-instantiations}@anchor{46b}
 @subsection Inference of Dependent Types in Generic Instantiations
 
 
@@ -31230,7 +31175,7 @@ package Int_Array_Operations is new Array_Operations
 @end example
 
 @node External_Initialization Aspect,Finally construct,Inference of Dependent 
Types in Generic Instantiations,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions 
external-initialization-aspect}@anchor{46d}
+@anchor{gnat_rm/gnat_language_extensions 
external-initialization-aspect}@anchor{46c}
 @subsection External_Initialization Aspect
 
 
@@ -31271,7 +31216,7 @@ The maximum size of loaded files is limited to 2@w{^31} 
bytes.
 @end cartouche
 
 @node Finally construct,,External_Initialization Aspect,Experimental Language 
Extensions
-@anchor{gnat_rm/gnat_language_extensions finally-construct}@anchor{46e}
+@anchor{gnat_rm/gnat_language_extensions finally-construct}@anchor{46d}
 @subsection Finally construct
 
 
@@ -31288,7 +31233,7 @@ This feature is similar to the one with the same name 
in other languages such as
 @end menu
 
 @node Syntax<2>,Legality Rules<2>,,Finally construct
-@anchor{gnat_rm/gnat_language_extensions id4}@anchor{46f}
+@anchor{gnat_rm/gnat_language_extensions id4}@anchor{46e}
 @subsubsection Syntax
 
 
@@ -31303,7 +31248,7 @@ handled_sequence_of_statements ::=
 @end example
 
 @node Legality Rules<2>,Dynamic Semantics<2>,Syntax<2>,Finally construct
-@anchor{gnat_rm/gnat_language_extensions id5}@anchor{470}
+@anchor{gnat_rm/gnat_language_extensions id5}@anchor{46f}
 @subsubsection Legality Rules
 
 
@@ -31313,7 +31258,7 @@ to be transferred outside the finally part are 
forbidden.
 Goto & exit where the target is outside of the finally’s 
@code{sequence_of_statements} are forbidden
 
 @node Dynamic Semantics<2>,,Legality Rules<2>,Finally construct
-@anchor{gnat_rm/gnat_language_extensions id6}@anchor{471}
+@anchor{gnat_rm/gnat_language_extensions id6}@anchor{470}
 @subsubsection Dynamic Semantics
 
 
@@ -31328,7 +31273,7 @@ execution, that is the finally block must be executed 
in full even if the contai
 aborted, or if the control is transferred out of the block.
 
 @node Security Hardening Features,Obsolescent Features,GNAT language 
extensions,Top
-@anchor{gnat_rm/security_hardening_features 
doc}@anchor{472}@anchor{gnat_rm/security_hardening_features 
id1}@anchor{473}@anchor{gnat_rm/security_hardening_features 
security-hardening-features}@anchor{15}
+@anchor{gnat_rm/security_hardening_features 
doc}@anchor{471}@anchor{gnat_rm/security_hardening_features 
id1}@anchor{472}@anchor{gnat_rm/security_hardening_features 
security-hardening-features}@anchor{15}
 @chapter Security Hardening Features
 
 
@@ -31350,7 +31295,7 @@ change.
 @end menu
 
 @node Register Scrubbing,Stack Scrubbing,,Security Hardening Features
-@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{474}
+@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{473}
 @section Register Scrubbing
 
 
@@ -31386,7 +31331,7 @@ programming languages, see @cite{Using the GNU Compiler 
Collection (GCC)}.
 @c Stack Scrubbing:
 
 @node Stack Scrubbing,Hardened Conditionals,Register Scrubbing,Security 
Hardening Features
-@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{475}
+@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{474}
 @section Stack Scrubbing
 
 
@@ -31530,7 +31475,7 @@ Bar_Callable_Ptr.
 @c Hardened Conditionals:
 
 @node Hardened Conditionals,Hardened Booleans,Stack Scrubbing,Security 
Hardening Features
-@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{476}
+@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{475}
 @section Hardened Conditionals
 
 
@@ -31620,7 +31565,7 @@ be used with other programming languages supported by 
GCC.
 @c Hardened Booleans:
 
 @node Hardened Booleans,Control Flow Redundancy,Hardened Conditionals,Security 
Hardening Features
-@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{477}
+@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{476}
 @section Hardened Booleans
 
 
@@ -31681,7 +31626,7 @@ and more details on that attribute, see @cite{Using the 
GNU Compiler Collection
 @c Control Flow Redundancy:
 
 @node Control Flow Redundancy,,Hardened Booleans,Security Hardening Features
-@anchor{gnat_rm/security_hardening_features 
control-flow-redundancy}@anchor{478}
+@anchor{gnat_rm/security_hardening_features 
control-flow-redundancy}@anchor{477}
 @section Control Flow Redundancy
 
 
@@ -31849,7 +31794,7 @@ see @cite{Using the GNU Compiler Collection (GCC)}.  
These options
 can be used with other programming languages supported by GCC.
 
 @node Obsolescent Features,Compatibility and Porting Guide,Security Hardening 
Features,Top
-@anchor{gnat_rm/obsolescent_features 
doc}@anchor{479}@anchor{gnat_rm/obsolescent_features 
id1}@anchor{47a}@anchor{gnat_rm/obsolescent_features 
obsolescent-features}@anchor{16}
+@anchor{gnat_rm/obsolescent_features 
doc}@anchor{478}@anchor{gnat_rm/obsolescent_features 
id1}@anchor{479}@anchor{gnat_rm/obsolescent_features 
obsolescent-features}@anchor{16}
 @chapter Obsolescent Features
 
 
@@ -31868,7 +31813,7 @@ compatibility purposes.
 @end menu
 
 @node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features 
id2}@anchor{47b}@anchor{gnat_rm/obsolescent_features 
pragma-no-run-time}@anchor{47c}
+@anchor{gnat_rm/obsolescent_features 
id2}@anchor{47a}@anchor{gnat_rm/obsolescent_features 
pragma-no-run-time}@anchor{47b}
 @section pragma No_Run_Time
 
 
@@ -31881,7 +31826,7 @@ preferred usage is to use an appropriately configured 
run-time that
 includes just those features that are to be made accessible.
 
 @node pragma Ravenscar,pragma Restricted_Run_Time,pragma 
No_Run_Time,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features 
id3}@anchor{47d}@anchor{gnat_rm/obsolescent_features 
pragma-ravenscar}@anchor{47e}
+@anchor{gnat_rm/obsolescent_features 
id3}@anchor{47c}@anchor{gnat_rm/obsolescent_features 
pragma-ravenscar}@anchor{47d}
 @section pragma Ravenscar
 
 
@@ -31890,7 +31835,7 @@ The pragma @code{Ravenscar} has exactly the same effect 
as pragma
 is part of the new Ada 2005 standard.
 
 @node pragma Restricted_Run_Time,pragma Task_Info,pragma Ravenscar,Obsolescent 
Features
-@anchor{gnat_rm/obsolescent_features 
id4}@anchor{47f}@anchor{gnat_rm/obsolescent_features 
pragma-restricted-run-time}@anchor{480}
+@anchor{gnat_rm/obsolescent_features 
id4}@anchor{47e}@anchor{gnat_rm/obsolescent_features 
pragma-restricted-run-time}@anchor{47f}
 @section pragma Restricted_Run_Time
 
 
@@ -31900,7 +31845,7 @@ preferred since the Ada 2005 pragma @code{Profile} is 
intended for
 this kind of implementation dependent addition.
 
 @node pragma Task_Info,package System Task_Info s-tasinf ads,pragma 
Restricted_Run_Time,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features 
id5}@anchor{481}@anchor{gnat_rm/obsolescent_features 
pragma-task-info}@anchor{482}
+@anchor{gnat_rm/obsolescent_features 
id5}@anchor{480}@anchor{gnat_rm/obsolescent_features 
pragma-task-info}@anchor{481}
 @section pragma Task_Info
 
 
@@ -31926,7 +31871,7 @@ in the spec of package System.Task_Info in the runtime
 library.
 
 @node package System Task_Info s-tasinf ads,,pragma Task_Info,Obsolescent 
Features
-@anchor{gnat_rm/obsolescent_features 
package-system-task-info}@anchor{483}@anchor{gnat_rm/obsolescent_features 
package-system-task-info-s-tasinf-ads}@anchor{484}
+@anchor{gnat_rm/obsolescent_features 
package-system-task-info}@anchor{482}@anchor{gnat_rm/obsolescent_features 
package-system-task-info-s-tasinf-ads}@anchor{483}
 @section package System.Task_Info (@code{s-tasinf.ads})
 
 
@@ -31936,7 +31881,7 @@ to support the @code{Task_Info} pragma. The predefined 
Ada package
 standard replacement for GNAT’s @code{Task_Info} functionality.
 
 @node Compatibility and Porting Guide,GNU Free Documentation 
License,Obsolescent Features,Top
-@anchor{gnat_rm/compatibility_and_porting_guide 
doc}@anchor{485}@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide
 id1}@anchor{486}
+@anchor{gnat_rm/compatibility_and_porting_guide 
doc}@anchor{484}@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide
 id1}@anchor{485}
 @chapter Compatibility and Porting Guide
 
 
@@ -31958,7 +31903,7 @@ applications developed in other Ada environments.
 @end menu
 
 @node Writing Portable Fixed-Point Declarations,Compatibility with Ada 
83,,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
id2}@anchor{487}@anchor{gnat_rm/compatibility_and_porting_guide 
writing-portable-fixed-point-declarations}@anchor{488}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id2}@anchor{486}@anchor{gnat_rm/compatibility_and_porting_guide 
writing-portable-fixed-point-declarations}@anchor{487}
 @section Writing Portable Fixed-Point Declarations
 
 
@@ -32080,7 +32025,7 @@ If you follow this scheme you will be guaranteed that 
your fixed-point
 types will be portable.
 
 @node Compatibility with Ada 83,Compatibility between Ada 95 and Ada 
2005,Writing Portable Fixed-Point Declarations,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-ada-83}@anchor{489}@anchor{gnat_rm/compatibility_and_porting_guide
 id3}@anchor{48a}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-ada-83}@anchor{488}@anchor{gnat_rm/compatibility_and_porting_guide
 id3}@anchor{489}
 @section Compatibility with Ada 83
 
 
@@ -32108,7 +32053,7 @@ following subsections treat the most likely issues to 
be encountered.
 @end menu
 
 @node Legal Ada 83 programs that are illegal in Ada 95,More deterministic 
semantics,,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide 
id4}@anchor{48b}@anchor{gnat_rm/compatibility_and_porting_guide 
legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{48c}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id4}@anchor{48a}@anchor{gnat_rm/compatibility_and_porting_guide 
legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{48b}
 @subsection Legal Ada 83 programs that are illegal in Ada 95
 
 
@@ -32208,7 +32153,7 @@ the fix is usually simply to add the @code{(<>)} to the 
generic declaration.
 @end itemize
 
 @node More deterministic semantics,Changed semantics,Legal Ada 83 programs 
that are illegal in Ada 95,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide 
id5}@anchor{48d}@anchor{gnat_rm/compatibility_and_porting_guide 
more-deterministic-semantics}@anchor{48e}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id5}@anchor{48c}@anchor{gnat_rm/compatibility_and_porting_guide 
more-deterministic-semantics}@anchor{48d}
 @subsection More deterministic semantics
 
 
@@ -32236,7 +32181,7 @@ which open select branches are executed.
 @end itemize
 
 @node Changed semantics,Other language compatibility issues,More deterministic 
semantics,Compatibility with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide 
changed-semantics}@anchor{48f}@anchor{gnat_rm/compatibility_and_porting_guide 
id6}@anchor{490}
+@anchor{gnat_rm/compatibility_and_porting_guide 
changed-semantics}@anchor{48e}@anchor{gnat_rm/compatibility_and_porting_guide 
id6}@anchor{48f}
 @subsection Changed semantics
 
 
@@ -32278,7 +32223,7 @@ covers only the restricted range.
 @end itemize
 
 @node Other language compatibility issues,,Changed semantics,Compatibility 
with Ada 83
-@anchor{gnat_rm/compatibility_and_porting_guide 
id7}@anchor{491}@anchor{gnat_rm/compatibility_and_porting_guide 
other-language-compatibility-issues}@anchor{492}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id7}@anchor{490}@anchor{gnat_rm/compatibility_and_porting_guide 
other-language-compatibility-issues}@anchor{491}
 @subsection Other language compatibility issues
 
 
@@ -32311,7 +32256,7 @@ include @code{pragma Interface} and the floating point 
type attributes
 @end itemize
 
 @node Compatibility between Ada 95 and Ada 2005,Implementation-dependent 
characteristics,Compatibility with Ada 83,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-between-ada-95-and-ada-2005}@anchor{493}@anchor{gnat_rm/compatibility_and_porting_guide
 id8}@anchor{494}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-between-ada-95-and-ada-2005}@anchor{492}@anchor{gnat_rm/compatibility_and_porting_guide
 id8}@anchor{493}
 @section Compatibility between Ada 95 and Ada 2005
 
 
@@ -32383,7 +32328,7 @@ can declare a function returning a value from an 
anonymous access type.
 @end itemize
 
 @node Implementation-dependent characteristics,Compatibility with Other Ada 
Systems,Compatibility between Ada 95 and Ada 2005,Compatibility and Porting 
Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
id9}@anchor{495}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-dependent-characteristics}@anchor{496}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id9}@anchor{494}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-dependent-characteristics}@anchor{495}
 @section Implementation-dependent characteristics
 
 
@@ -32406,7 +32351,7 @@ transition from certain Ada 83 compilers.
 @end menu
 
 @node Implementation-defined pragmas,Implementation-defined 
attributes,,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide 
id10}@anchor{497}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-pragmas}@anchor{498}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id10}@anchor{496}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-pragmas}@anchor{497}
 @subsection Implementation-defined pragmas
 
 
@@ -32428,7 +32373,7 @@ avoiding compiler rejection of units that contain such 
pragmas; they are not
 relevant in a GNAT context and hence are not otherwise implemented.
 
 @node Implementation-defined attributes,Libraries,Implementation-defined 
pragmas,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide 
id11}@anchor{499}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-attributes}@anchor{49a}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id11}@anchor{498}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-attributes}@anchor{499}
 @subsection Implementation-defined attributes
 
 
@@ -32442,7 +32387,7 @@ Ada 83, GNAT supplies the attributes @code{Bit}, 
@code{Machine_Size} and
 @code{Type_Class}.
 
 @node Libraries,Elaboration order,Implementation-defined 
attributes,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide 
id12}@anchor{49b}@anchor{gnat_rm/compatibility_and_porting_guide 
libraries}@anchor{49c}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id12}@anchor{49a}@anchor{gnat_rm/compatibility_and_porting_guide 
libraries}@anchor{49b}
 @subsection Libraries
 
 
@@ -32471,7 +32416,7 @@ be preferable to retrofit the application using modular 
types.
 @end itemize
 
 @node Elaboration order,Target-specific 
aspects,Libraries,Implementation-dependent characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide 
elaboration-order}@anchor{49d}@anchor{gnat_rm/compatibility_and_porting_guide 
id13}@anchor{49e}
+@anchor{gnat_rm/compatibility_and_porting_guide 
elaboration-order}@anchor{49c}@anchor{gnat_rm/compatibility_and_porting_guide 
id13}@anchor{49d}
 @subsection Elaboration order
 
 
@@ -32507,7 +32452,7 @@ pragmas either globally (as an effect of the `-gnatE' 
switch) or locally
 @end itemize
 
 @node Target-specific aspects,,Elaboration order,Implementation-dependent 
characteristics
-@anchor{gnat_rm/compatibility_and_porting_guide 
id14}@anchor{49f}@anchor{gnat_rm/compatibility_and_porting_guide 
target-specific-aspects}@anchor{4a0}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id14}@anchor{49e}@anchor{gnat_rm/compatibility_and_porting_guide 
target-specific-aspects}@anchor{49f}
 @subsection Target-specific aspects
 
 
@@ -32520,10 +32465,10 @@ on the robustness of the original design.  Moreover, 
Ada 95 (and thus
 Ada 2005 and Ada 2012) are sometimes
 incompatible with typical Ada 83 compiler practices regarding implicit
 packing, the meaning of the Size attribute, and the size of access values.
-GNAT’s approach to these issues is described in @ref{4a1,,Representation 
Clauses}.
+GNAT’s approach to these issues is described in @ref{4a0,,Representation 
Clauses}.
 
 @node Compatibility with Other Ada Systems,Representation 
Clauses,Implementation-dependent characteristics,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-other-ada-systems}@anchor{4a2}@anchor{gnat_rm/compatibility_and_porting_guide
 id15}@anchor{4a3}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-other-ada-systems}@anchor{4a1}@anchor{gnat_rm/compatibility_and_porting_guide
 id15}@anchor{4a2}
 @section Compatibility with Other Ada Systems
 
 
@@ -32566,7 +32511,7 @@ far beyond this minimal set, as described in the next 
section.
 @end itemize
 
 @node Representation Clauses,Compatibility with HP Ada 83,Compatibility with 
Other Ada Systems,Compatibility and Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
id16}@anchor{4a4}@anchor{gnat_rm/compatibility_and_porting_guide 
representation-clauses}@anchor{4a1}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id16}@anchor{4a3}@anchor{gnat_rm/compatibility_and_porting_guide 
representation-clauses}@anchor{4a0}
 @section Representation Clauses
 
 
@@ -32659,7 +32604,7 @@ with thin pointers.
 @end itemize
 
 @node Compatibility with HP Ada 83,,Representation Clauses,Compatibility and 
Porting Guide
-@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-hp-ada-83}@anchor{4a5}@anchor{gnat_rm/compatibility_and_porting_guide
 id17}@anchor{4a6}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-hp-ada-83}@anchor{4a4}@anchor{gnat_rm/compatibility_and_porting_guide
 id17}@anchor{4a5}
 @section Compatibility with HP Ada 83
 
 
@@ -32689,7 +32634,7 @@ extension of package System.
 @end itemize
 
 @node GNU Free Documentation License,Index,Compatibility and Porting Guide,Top
-@anchor{share/gnu_free_documentation_license 
doc}@anchor{4a7}@anchor{share/gnu_free_documentation_license 
gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license 
gnu-free-documentation-license}@anchor{4a8}
+@anchor{share/gnu_free_documentation_license 
doc}@anchor{4a6}@anchor{share/gnu_free_documentation_license 
gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license 
gnu-free-documentation-license}@anchor{4a7}
 @chapter GNU Free Documentation License
 
 
-- 
2.43.0

Reply via email to