[multiple changes]
[gcc.git] / gcc / ada / gnat_rm.texi
index cdd2f4e215e1cf50454b8ac7e6523ced6f3a5ec3..7e02d3bd2997f8d5682e3cf9e8591dc4547a3bc1 100644 (file)
@@ -279,8 +279,6 @@ Implementation Defined Pragmas
 Implementation Defined Aspects
 
 * Aspect Abstract_State::
-* Aspect Ada_2005::
-* Aspect Ada_2012::
 * Aspect Compiler_Unit::
 * Aspect Contract_Cases::
 * Aspect Depends::
@@ -1188,6 +1186,7 @@ either Ada 83 or Ada 95 programs.
 Syntax:
 @smallexample @c ada
 pragma Ada_05;
+pragma Ada_05 (local_NAME);
 @end smallexample
 
 @noindent
@@ -1197,6 +1196,17 @@ This pragma is useful when writing a reusable component that
 itself uses Ada 2005 features, but which is intended to be usable from
 either Ada 83 or Ada 95 programs.
 
+The one argument form (which is not a configuration pragma)
+is used for managing the transition from
+Ada 95 to Ada 2005 in the run-time library. If an entity is marked
+as Ada_2005 only, then referencing the entity in Ada_83 or Ada_95
+mode will generate a warning. In addition, in Ada_83 or Ada_95
+mode, a preference rule is established which does not choose
+such an entity unless it is unambiguously specified. This avoids
+extra subprograms marked this way from generating ambiguities in
+otherwise legal pre-Ada_2005 programs. The one argument form is
+intended for exclusive use in the GNAT run-time library.
+
 @node Pragma Ada_2005
 @unnumberedsec Pragma Ada_2005
 @findex Ada_2005
@@ -1217,6 +1227,7 @@ same syntax and effect.
 Syntax:
 @smallexample @c ada
 pragma Ada_12;
+pragma Ada_12 (local_NAME);
 @end smallexample
 
 @noindent
@@ -1228,6 +1239,17 @@ contexts.  This pragma is useful when writing a reusable component that
 itself uses Ada 2012 features, but which is intended to be usable from
 Ada 83, Ada 95, or Ada 2005 programs.
 
+The one argument form, which is not a configuration pragma,
+is used for managing the transition from Ada
+2005 to Ada 2012 in the run-time library. If an entity is marked
+as Ada_201 only, then referencing the entity in any pre-Ada_2012
+mode will generate a warning. In addition, in any pre-Ada_2012
+mode, a preference rule is established which does not choose
+such an entity unless it is unambiguously specified. This avoids
+extra subprograms marked this way from generating ambiguities in
+otherwise legal pre-Ada_2012 programs. The one argument form is
+intended for exclusive use in the GNAT run-time library.
+
 @node Pragma Ada_2012
 @unnumberedsec Pragma Ada_2012
 @findex Ada_2005
@@ -7640,8 +7662,6 @@ clause.
 
 @menu
 * Aspect Abstract_State::
-* Aspect Ada_2005::
-* Aspect Ada_2012::
 * Aspect Compiler_Unit::
 * Aspect Contract_Cases::
 * Aspect Depends::
@@ -7686,18 +7706,6 @@ clause.
 @noindent
 This aspect is equivalent to pragma @code{Abstract_State}.
 
-@node Aspect Ada_2005
-@unnumberedsec Aspect Ada_2005
-@findex Ada_2005
-@noindent
-This aspect is equivalent to the one argument form of pragma @code{Ada_2005}.
-
-@node Aspect Ada_2012
-@unnumberedsec Aspect Ada_2012
-@findex Ada_2012
-@noindent
-This aspect is equivalent to the one argument form of pragma @code{Ada_2012}.
-
 @node Aspect Compiler_Unit
 @unnumberedsec Aspect Compiler_Unit
 @findex Compiler_Unit