From: Javier Miranda <mira...@adacore.com>

gcc/ada/

        * usage.adb (Usage): Document switch -gnatw_j
        * doc/gnat_rm/gnat_language_extensions.rst: Add documentation.
        * gnat_rm.texi: Regenerate.

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

---
 .../doc/gnat_rm/gnat_language_extensions.rst  |  82 +++++++++
 gcc/ada/gnat_rm.texi                          | 166 +++++++++++++-----
 gcc/ada/usage.adb                             |   3 +
 3 files changed, 211 insertions(+), 40 deletions(-)

diff --git a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst 
b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
index af10289b8b1..27be5e0c3d5 100644
--- a/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
+++ b/gcc/ada/doc/gnat_rm/gnat_language_extensions.rst
@@ -269,6 +269,88 @@ The Ada 202x ``Static`` aspect can be specified on 
Intrinsic imported functions
 and the compiler will evaluate some of these intrinsics statically, in
 particular the ``Shift_Left`` and ``Shift_Right`` intrinsics.
 
+First Controlling Parameter
+---------------------------
+
+A new pragma/aspect, ``First_Controlling_Parameter``, is introduced for tagged
+types, altering the semantics of primitive/controlling parameters. When a
+tagged type is marked with this aspect, only subprograms where the first
+parameter is of that type will be considered dispatching primitives. This
+pragma/aspect applies to the entire hierarchy, starting from the specified
+type, without affecting inherited primitives.
+
+Here is an example of this feature:
+
+.. code-block:: ada
+
+    package Example is
+       type Root is tagged private;
+
+       procedure P (V : Integer; V2 : Root);
+       -- Primitive
+
+       type Child is tagged private
+         with First_Controlling_Parameter;
+
+    private
+       type Root is tagged null record;
+       type Child is new Root with null record;
+
+       overriding
+       procedure P (V : Integer; V2 : Child);
+       -- Primitive
+
+       procedure P2 (V : Integer; V2 : Child);
+       -- NOT Primitive
+
+       function F return Child; -- NOT Primitive
+
+       function F2 (V : Child) return Child;
+       -- Primitive, but only controlling on the first parameter
+    end;
+
+Note that ``function F2 (V : Child) return Child;`` differs from ``F2 (V : 
Child)
+return Child'Class;`` in that the return type is a specific, definite type. 
This
+is also distinct from the legacy semantics, where further derivations with
+added fields would require overriding the function.
+
+The option ``-gnatw_j``, that you can pass to the compiler directly, enables
+warnings related to this new language feature. For instance, compiling the
+example above without this switch produces no warnings, but compiling it with
+``-gnatw_j`` generates the following warning on the declaration of procedure 
P2:
+
+.. code-block:: ada
+
+    warning: not a dispatching primitive of tagged type "Child"
+    warning: disallowed by First_Controlling_Parameter on "Child"
+
+For generic formal tagged types, you can specify whether the type has the
+First_Controlling_Parameter aspect enabled:
+
+.. code-block:: ada
+
+    generic
+       type T is tagged private with First_Controlling_Parameter;
+    package T is
+        type U is new T with null record;
+        function Foo return U; -- Not a primitive
+    end T;
+
+For tagged partial views, the value of the aspect must be consistent between
+the partial and full views:
+
+.. code-block:: ada
+
+    package R is
+       type T is tagged private;
+    ...
+    private
+       type T is tagged null record with First_Controlling_Parameter; -- 
ILLEGAL
+    end R;
+
+Link to the original RFC:
+https://github.com/AdaCore/ada-spark-rfcs/blob/master/considered/rfc-oop-first-controlling.rst
+
 .. _Experimental_Language_Extensions:
 
 Experimental Language Extensions
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index a2c14e203c3..f901b0e133e 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -901,6 +901,7 @@ Curated Extensions
 * String interpolation:: 
 * Constrained attribute for generic objects:: 
 * Static aspect on intrinsic functions:: 
+* First Controlling Parameter:: 
 
 Experimental Language Extensions
 
@@ -28945,6 +28946,7 @@ for use in playground experiments.
 * String interpolation:: 
 * Constrained attribute for generic objects:: 
 * Static aspect on intrinsic functions:: 
+* First Controlling Parameter:: 
 
 @end menu
 
@@ -29270,7 +29272,7 @@ Link to the original RFC:
 The @code{Constrained} attribute is permitted for objects of generic types. The
 result indicates whether the corresponding actual is constrained.
 
-@node Static aspect on intrinsic functions,,Constrained attribute for generic 
objects,Curated Extensions
+@node Static aspect on intrinsic functions,First Controlling 
Parameter,Constrained attribute for generic objects,Curated Extensions
 @anchor{gnat_rm/gnat_language_extensions 
static-aspect-on-intrinsic-functions}@anchor{44b}
 @subsection @code{Static} aspect on intrinsic functions
 
@@ -29279,8 +29281,92 @@ The Ada 202x @code{Static} aspect can be specified on 
Intrinsic imported functio
 and the compiler will evaluate some of these intrinsics statically, in
 particular the @code{Shift_Left} and @code{Shift_Right} intrinsics.
 
+@node First Controlling Parameter,,Static aspect on intrinsic 
functions,Curated Extensions
+@anchor{gnat_rm/gnat_language_extensions 
first-controlling-parameter}@anchor{44c}
+@subsection First Controlling Parameter
+
+
+A new pragma/aspect, @code{First_Controlling_Parameter}, is introduced for 
tagged
+types, altering the semantics of primitive/controlling parameters. When a
+tagged type is marked with this aspect, only subprograms where the first
+parameter is of that type will be considered dispatching primitives. This
+pragma/aspect applies to the entire hierarchy, starting from the specified
+type, without affecting inherited primitives.
+
+Here is an example of this feature:
+
+@example
+package Example is
+   type Root is tagged private;
+
+   procedure P (V : Integer; V2 : Root);
+   -- Primitive
+
+   type Child is tagged private
+     with First_Controlling_Parameter;
+
+private
+   type Root is tagged null record;
+   type Child is new Root with null record;
+
+   overriding
+   procedure P (V : Integer; V2 : Child);
+   -- Primitive
+
+   procedure P2 (V : Integer; V2 : Child);
+   -- NOT Primitive
+
+   function F return Child; -- NOT Primitive
+
+   function F2 (V : Child) return Child;
+   -- Primitive, but only controlling on the first parameter
+end;
+@end example
+
+Note that @code{function F2 (V : Child) return Child;} differs from @code{F2 
(V : Child)
+return Child'Class;} in that the return type is a specific, definite type. This
+is also distinct from the legacy semantics, where further derivations with
+added fields would require overriding the function.
+
+The option @code{-gnatw_j}, that you can pass to the compiler directly, enables
+warnings related to this new language feature. For instance, compiling the
+example above without this switch produces no warnings, but compiling it with
+@code{-gnatw_j} generates the following warning on the declaration of 
procedure P2:
+
+@example
+warning: not a dispatching primitive of tagged type "Child"
+warning: disallowed by First_Controlling_Parameter on "Child"
+@end example
+
+For generic formal tagged types, you can specify whether the type has the
+First_Controlling_Parameter aspect enabled:
+
+@example
+generic
+   type T is tagged private with First_Controlling_Parameter;
+package T is
+    type U is new T with null record;
+    function Foo return U; -- Not a primitive
+end T;
+@end example
+
+For tagged partial views, the value of the aspect must be consistent between
+the partial and full views:
+
+@example
+package R is
+   type T is tagged private;
+...
+private
+   type T is tagged null record with First_Controlling_Parameter; -- ILLEGAL
+end R;
+@end example
+
+Link to the original RFC:
+@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/considered/rfc-oop-first-controlling.rst}
+
 @node Experimental Language Extensions,,Curated Extensions,GNAT language 
extensions
-@anchor{gnat_rm/gnat_language_extensions 
experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions
 id2}@anchor{44c}
+@anchor{gnat_rm/gnat_language_extensions 
experimental-language-extensions}@anchor{6a}@anchor{gnat_rm/gnat_language_extensions
 id2}@anchor{44d}
 @section Experimental Language Extensions
 
 
@@ -29296,7 +29382,7 @@ particular the @code{Shift_Left} and @code{Shift_Right} 
intrinsics.
 @end menu
 
 @node Conditional when constructs,Storage Model,,Experimental Language 
Extensions
-@anchor{gnat_rm/gnat_language_extensions 
conditional-when-constructs}@anchor{44d}
+@anchor{gnat_rm/gnat_language_extensions 
conditional-when-constructs}@anchor{44e}
 @subsection Conditional when constructs
 
 
@@ -29368,7 +29454,7 @@ Link to the original RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-conditional-when-constructs.rst}
 
 @node Storage Model,Attribute Super,Conditional when constructs,Experimental 
Language Extensions
-@anchor{gnat_rm/gnat_language_extensions storage-model}@anchor{44e}
+@anchor{gnat_rm/gnat_language_extensions storage-model}@anchor{44f}
 @subsection Storage Model
 
 
@@ -29383,7 +29469,7 @@ Here is a link to the full RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-storage-model.rst}
 
 @node Attribute Super,Simpler accessibility model,Storage Model,Experimental 
Language Extensions
-@anchor{gnat_rm/gnat_language_extensions attribute-super}@anchor{44f}
+@anchor{gnat_rm/gnat_language_extensions attribute-super}@anchor{450}
 @subsection Attribute Super
 
 
@@ -29413,7 +29499,7 @@ Here is a link to the full RFC:
 
@indicateurl{https://github.com/QuentinOchem/ada-spark-rfcs/blob/oop/considered/rfc-oop-super.rst}
 
 @node Simpler accessibility model,Case pattern matching,Attribute 
Super,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions 
simpler-accessibility-model}@anchor{450}
+@anchor{gnat_rm/gnat_language_extensions 
simpler-accessibility-model}@anchor{451}
 @subsection Simpler accessibility model
 
 
@@ -29426,7 +29512,7 @@ Here is a link to the full RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-simpler-accessibility.md}
 
 @node Case pattern matching,Mutably Tagged Types with Size’Class 
Aspect,Simpler accessibility model,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions case-pattern-matching}@anchor{451}
+@anchor{gnat_rm/gnat_language_extensions case-pattern-matching}@anchor{452}
 @subsection Case pattern matching
 
 
@@ -29558,7 +29644,7 @@ Link to the original RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/master/prototyped/rfc-pattern-matching.rst}
 
 @node Mutably Tagged Types with Size’Class Aspect,Generalized 
Finalization,Case pattern matching,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions 
mutably-tagged-types-with-size-class-aspect}@anchor{452}
+@anchor{gnat_rm/gnat_language_extensions 
mutably-tagged-types-with-size-class-aspect}@anchor{453}
 @subsection Mutably Tagged Types with Size’Class Aspect
 
 
@@ -29598,7 +29684,7 @@ Link to the original RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/topic/rfc-finally/considered/rfc-class-size.md}
 
 @node Generalized Finalization,,Mutably Tagged Types with Size’Class 
Aspect,Experimental Language Extensions
-@anchor{gnat_rm/gnat_language_extensions generalized-finalization}@anchor{453}
+@anchor{gnat_rm/gnat_language_extensions generalized-finalization}@anchor{454}
 @subsection Generalized Finalization
 
 
@@ -29630,7 +29716,7 @@ Link to the original RFC:
 
@indicateurl{https://github.com/AdaCore/ada-spark-rfcs/blob/topic/finalization-rehaul/considered/rfc-generalized-finalization.md}
 
 @node Security Hardening Features,Obsolescent Features,GNAT language 
extensions,Top
-@anchor{gnat_rm/security_hardening_features 
doc}@anchor{454}@anchor{gnat_rm/security_hardening_features 
id1}@anchor{455}@anchor{gnat_rm/security_hardening_features 
security-hardening-features}@anchor{15}
+@anchor{gnat_rm/security_hardening_features 
doc}@anchor{455}@anchor{gnat_rm/security_hardening_features 
id1}@anchor{456}@anchor{gnat_rm/security_hardening_features 
security-hardening-features}@anchor{15}
 @chapter Security Hardening Features
 
 
@@ -29652,7 +29738,7 @@ change.
 @end menu
 
 @node Register Scrubbing,Stack Scrubbing,,Security Hardening Features
-@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{456}
+@anchor{gnat_rm/security_hardening_features register-scrubbing}@anchor{457}
 @section Register Scrubbing
 
 
@@ -29688,7 +29774,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{457}
+@anchor{gnat_rm/security_hardening_features stack-scrubbing}@anchor{458}
 @section Stack Scrubbing
 
 
@@ -29832,7 +29918,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{458}
+@anchor{gnat_rm/security_hardening_features hardened-conditionals}@anchor{459}
 @section Hardened Conditionals
 
 
@@ -29922,7 +30008,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{459}
+@anchor{gnat_rm/security_hardening_features hardened-booleans}@anchor{45a}
 @section Hardened Booleans
 
 
@@ -29983,7 +30069,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{45a}
+@anchor{gnat_rm/security_hardening_features 
control-flow-redundancy}@anchor{45b}
 @section Control Flow Redundancy
 
 
@@ -30151,7 +30237,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{45b}@anchor{gnat_rm/obsolescent_features 
id1}@anchor{45c}@anchor{gnat_rm/obsolescent_features 
obsolescent-features}@anchor{16}
+@anchor{gnat_rm/obsolescent_features 
doc}@anchor{45c}@anchor{gnat_rm/obsolescent_features 
id1}@anchor{45d}@anchor{gnat_rm/obsolescent_features 
obsolescent-features}@anchor{16}
 @chapter Obsolescent Features
 
 
@@ -30170,7 +30256,7 @@ compatibility purposes.
 @end menu
 
 @node pragma No_Run_Time,pragma Ravenscar,,Obsolescent Features
-@anchor{gnat_rm/obsolescent_features 
id2}@anchor{45d}@anchor{gnat_rm/obsolescent_features 
pragma-no-run-time}@anchor{45e}
+@anchor{gnat_rm/obsolescent_features 
id2}@anchor{45e}@anchor{gnat_rm/obsolescent_features 
pragma-no-run-time}@anchor{45f}
 @section pragma No_Run_Time
 
 
@@ -30183,7 +30269,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{45f}@anchor{gnat_rm/obsolescent_features 
pragma-ravenscar}@anchor{460}
+@anchor{gnat_rm/obsolescent_features 
id3}@anchor{460}@anchor{gnat_rm/obsolescent_features 
pragma-ravenscar}@anchor{461}
 @section pragma Ravenscar
 
 
@@ -30192,7 +30278,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{461}@anchor{gnat_rm/obsolescent_features 
pragma-restricted-run-time}@anchor{462}
+@anchor{gnat_rm/obsolescent_features 
id4}@anchor{462}@anchor{gnat_rm/obsolescent_features 
pragma-restricted-run-time}@anchor{463}
 @section pragma Restricted_Run_Time
 
 
@@ -30202,7 +30288,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{463}@anchor{gnat_rm/obsolescent_features 
pragma-task-info}@anchor{464}
+@anchor{gnat_rm/obsolescent_features 
id5}@anchor{464}@anchor{gnat_rm/obsolescent_features 
pragma-task-info}@anchor{465}
 @section pragma Task_Info
 
 
@@ -30228,7 +30314,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{465}@anchor{gnat_rm/obsolescent_features 
package-system-task-info-s-tasinf-ads}@anchor{466}
+@anchor{gnat_rm/obsolescent_features 
package-system-task-info}@anchor{466}@anchor{gnat_rm/obsolescent_features 
package-system-task-info-s-tasinf-ads}@anchor{467}
 @section package System.Task_Info (@code{s-tasinf.ads})
 
 
@@ -30238,7 +30324,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{467}@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide
 id1}@anchor{468}
+@anchor{gnat_rm/compatibility_and_porting_guide 
doc}@anchor{468}@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-and-porting-guide}@anchor{17}@anchor{gnat_rm/compatibility_and_porting_guide
 id1}@anchor{469}
 @chapter Compatibility and Porting Guide
 
 
@@ -30260,7 +30346,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{469}@anchor{gnat_rm/compatibility_and_porting_guide 
writing-portable-fixed-point-declarations}@anchor{46a}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id2}@anchor{46a}@anchor{gnat_rm/compatibility_and_porting_guide 
writing-portable-fixed-point-declarations}@anchor{46b}
 @section Writing Portable Fixed-Point Declarations
 
 
@@ -30382,7 +30468,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{46b}@anchor{gnat_rm/compatibility_and_porting_guide
 id3}@anchor{46c}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-ada-83}@anchor{46c}@anchor{gnat_rm/compatibility_and_porting_guide
 id3}@anchor{46d}
 @section Compatibility with Ada 83
 
 
@@ -30410,7 +30496,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{46d}@anchor{gnat_rm/compatibility_and_porting_guide 
legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{46e}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id4}@anchor{46e}@anchor{gnat_rm/compatibility_and_porting_guide 
legal-ada-83-programs-that-are-illegal-in-ada-95}@anchor{46f}
 @subsection Legal Ada 83 programs that are illegal in Ada 95
 
 
@@ -30510,7 +30596,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{46f}@anchor{gnat_rm/compatibility_and_porting_guide 
more-deterministic-semantics}@anchor{470}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id5}@anchor{470}@anchor{gnat_rm/compatibility_and_porting_guide 
more-deterministic-semantics}@anchor{471}
 @subsection More deterministic semantics
 
 
@@ -30538,7 +30624,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{471}@anchor{gnat_rm/compatibility_and_porting_guide 
id6}@anchor{472}
+@anchor{gnat_rm/compatibility_and_porting_guide 
changed-semantics}@anchor{472}@anchor{gnat_rm/compatibility_and_porting_guide 
id6}@anchor{473}
 @subsection Changed semantics
 
 
@@ -30580,7 +30666,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{473}@anchor{gnat_rm/compatibility_and_porting_guide 
other-language-compatibility-issues}@anchor{474}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id7}@anchor{474}@anchor{gnat_rm/compatibility_and_porting_guide 
other-language-compatibility-issues}@anchor{475}
 @subsection Other language compatibility issues
 
 
@@ -30613,7 +30699,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{475}@anchor{gnat_rm/compatibility_and_porting_guide
 id8}@anchor{476}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-between-ada-95-and-ada-2005}@anchor{476}@anchor{gnat_rm/compatibility_and_porting_guide
 id8}@anchor{477}
 @section Compatibility between Ada 95 and Ada 2005
 
 
@@ -30685,7 +30771,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{477}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-dependent-characteristics}@anchor{478}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id9}@anchor{478}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-dependent-characteristics}@anchor{479}
 @section Implementation-dependent characteristics
 
 
@@ -30708,7 +30794,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{479}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-pragmas}@anchor{47a}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id10}@anchor{47a}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-pragmas}@anchor{47b}
 @subsection Implementation-defined pragmas
 
 
@@ -30730,7 +30816,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{47b}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-attributes}@anchor{47c}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id11}@anchor{47c}@anchor{gnat_rm/compatibility_and_porting_guide 
implementation-defined-attributes}@anchor{47d}
 @subsection Implementation-defined attributes
 
 
@@ -30744,7 +30830,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{47d}@anchor{gnat_rm/compatibility_and_porting_guide 
libraries}@anchor{47e}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id12}@anchor{47e}@anchor{gnat_rm/compatibility_and_porting_guide 
libraries}@anchor{47f}
 @subsection Libraries
 
 
@@ -30773,7 +30859,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{47f}@anchor{gnat_rm/compatibility_and_porting_guide 
id13}@anchor{480}
+@anchor{gnat_rm/compatibility_and_porting_guide 
elaboration-order}@anchor{480}@anchor{gnat_rm/compatibility_and_porting_guide 
id13}@anchor{481}
 @subsection Elaboration order
 
 
@@ -30809,7 +30895,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{481}@anchor{gnat_rm/compatibility_and_porting_guide 
target-specific-aspects}@anchor{482}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id14}@anchor{482}@anchor{gnat_rm/compatibility_and_porting_guide 
target-specific-aspects}@anchor{483}
 @subsection Target-specific aspects
 
 
@@ -30822,10 +30908,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{483,,Representation 
Clauses}.
+GNAT’s approach to these issues is described in @ref{484,,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{484}@anchor{gnat_rm/compatibility_and_porting_guide
 id15}@anchor{485}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-other-ada-systems}@anchor{485}@anchor{gnat_rm/compatibility_and_porting_guide
 id15}@anchor{486}
 @section Compatibility with Other Ada Systems
 
 
@@ -30868,7 +30954,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{486}@anchor{gnat_rm/compatibility_and_porting_guide 
representation-clauses}@anchor{483}
+@anchor{gnat_rm/compatibility_and_porting_guide 
id16}@anchor{487}@anchor{gnat_rm/compatibility_and_porting_guide 
representation-clauses}@anchor{484}
 @section Representation Clauses
 
 
@@ -30961,7 +31047,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{487}@anchor{gnat_rm/compatibility_and_porting_guide
 id17}@anchor{488}
+@anchor{gnat_rm/compatibility_and_porting_guide 
compatibility-with-hp-ada-83}@anchor{488}@anchor{gnat_rm/compatibility_and_porting_guide
 id17}@anchor{489}
 @section Compatibility with HP Ada 83
 
 
@@ -30991,7 +31077,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{489}@anchor{share/gnu_free_documentation_license 
gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license 
gnu-free-documentation-license}@anchor{48a}
+@anchor{share/gnu_free_documentation_license 
doc}@anchor{48a}@anchor{share/gnu_free_documentation_license 
gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license 
gnu-free-documentation-license}@anchor{48b}
 @chapter GNU Free Documentation License
 
 
diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb
index 59cbd6f4a2f..5b7743703c5 100644
--- a/gcc/ada/usage.adb
+++ b/gcc/ada/usage.adb
@@ -527,6 +527,9 @@ begin
                                                   "primitives");
    Write_Line ("        .J*  turn off warnings for late dispatching " &
                                                   "primitives");
+   Write_Line ("        _j   turn on warnings for First_Controlling_" &
+                                                  "Parameter aspect");
+
    Write_Line ("        k+   turn on warnings on constant variable");
    Write_Line ("        K*   turn off warnings on constant variable");
    Write_Line ("        .k   turn on warnings for standard redefinition");
-- 
2.45.2

Reply via email to