aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc/gnat_rm
diff options
context:
space:
mode:
authorJustin Squirek <squirek@adacore.com>2024-05-09 19:50:01 +0000
committerMarc Poulhiès <poulhies@adacore.com>2024-06-20 10:50:49 +0200
commit6e5f911e779e7571ce8c6f082f8aafaa2d5eca23 (patch)
tree5fc3f6241df97cc1f222f5f92c9ff46769d582c3 /gcc/ada/doc/gnat_rm
parentcba9a6c978da6c5ef559fba9509b89551ed82812 (diff)
downloadgcc-6e5f911e779e7571ce8c6f082f8aafaa2d5eca23.zip
gcc-6e5f911e779e7571ce8c6f082f8aafaa2d5eca23.tar.gz
gcc-6e5f911e779e7571ce8c6f082f8aafaa2d5eca23.tar.bz2
ada: Update documentation for 'Super
This patch moves the documentation for 'Super from gnat language extensions to experimental language extensions. gcc/ada/ * doc/gnat_rm/gnat_language_extensions.rst: Add entry for 'Super. * doc/gnat_rm/implementation_defined_attributes.rst: Remove entry for 'Super. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc/gnat_rm')
-rw-r--r--gcc/ada/doc/gnat_rm/gnat_language_extensions.rst27
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst24
2 files changed, 27 insertions, 24 deletions
diff --git a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
index cf1ad60..99cab9d 100644
--- a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
+++ b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
@@ -368,6 +368,33 @@ support interactions with GPU.
Here is a link to the full RFC:
https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-storage-model.rst
+Attribute Super
+---------------
+.. index:: Super
+
+The ``Super`` attribute can be applied to objects of tagged types in order
+to obtain a view conversion to the most immediate specific parent type.
+
+It cannot be applied to objects of types without any ancestors, or types whose
+immediate parent is abstract.
+
+.. code-block:: ada
+
+ type T1 is tagged null record;
+ procedure P (V : T1);
+
+ type T2 is new T1 with null record;
+ procedure P (V : T2);
+
+ procedure Call (V : T2'Class) is
+ begin
+ V'Super.P; -- Equivalent to "P (T1 (V));", a nondispatching call
+ -- to T1's primitive procedure P.
+ end;
+
+Here is a link to the full RFC:
+https://github.com/QuentinOchem/ada-spark-rfcs/blob/oop/considered/rfc-oop-super.rst
+
Simpler accessibility model
---------------------------
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
index d5a55b9..2db245a 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
@@ -1225,30 +1225,6 @@ type ``RACW_Stub_Type`` declared in the internal implementation-defined
unit ``System.Partition_Interface``. Use of this attribute will create
an implicit dependency on this unit.
-Attribute Super
-===============
-.. index:: Super
-
-The ``Super`` attribute can be applied to objects of tagged types in order
-to obtain a view conversion to the most immediate specific parent type.
-
-It cannot be applied to objects of types without any ancestors, or types whose
-immediate parent is an interface type.
-
-.. code-block:: ada
-
- type T1 is tagged null record;
- procedure P (V : T1);
-
- type T2 is new T1 with null record;
- procedure P (V : T2);
-
- procedure Call (V : T2'Class) is
- begin
- V'Super.P; -- Equivalent to "P (T1 (V));", a nondispatching call
- -- to T1's primitive procedure P.
- end;
-
Attribute System_Allocator_Alignment
====================================
.. index:: Alignment, allocator