aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorThomas Koenig <tkoenig@gcc.gnu.org>2021-01-03 21:40:04 +0100
committerThomas Koenig <tkoenig@gcc.gnu.org>2021-01-03 21:40:04 +0100
commitafae4a55ccaa0de95ea11e5f634084db6ab2f444 (patch)
treed632cc867d10410ba9fb750523be790b86846ac4 /gcc/ada/doc
parent9d9a82ec8478ff52c7a9d61f58cd2a7b6295b5f9 (diff)
parentd2eb616a0f7bea78164912aa438c29fe1ef5774a (diff)
downloadgcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.zip
gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.gz
gcc-afae4a55ccaa0de95ea11e5f634084db6ab2f444.tar.bz2
Merge branch 'master' into devel/coarray_native
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst2
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst35
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst30
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst52
-rw-r--r--gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst4
-rw-r--r--gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst15
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst2
-rw-r--r--gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst4
-rw-r--r--gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst4
9 files changed, 110 insertions, 38 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst
index de5efea..6f39de6 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst
@@ -566,7 +566,7 @@ Aspect Unreferenced
This boolean aspect is equivalent to :ref:`pragma Unreferenced<Pragma-Unreferenced>`.
-When using the ``-gnatX`` switch, this aspect is also supported on formal
+When using the ``-gnat2020`` switch, this aspect is also supported on formal
parameters, which is in particular the only form possible for expression
functions.
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
index f98a427..f8d41ea 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst
@@ -483,6 +483,19 @@ otherwise. The intended use of this attribute is in conjunction with generic
definitions. If the attribute is applied to a generic private type, it
indicates whether or not the corresponding actual type has discriminants.
+Attribute Has_Tagged_Values
+===========================
+.. index:: Tagged values, testing for
+
+.. index:: Has_Tagged_Values
+
+The prefix of the ``Has_Tagged_Values`` attribute is a type. The result is a
+Boolean value which is True if the type is a composite type (array or record)
+that is either a tagged type or has a subcomponent that is tagged, and is False
+otherwise. The intended use of this attribute is in conjunction with generic
+definitions. If the attribute is applied to a generic private type, it
+indicates whether or not the corresponding actual type has access values.
+
Attribute Img
=============
.. index:: Img
@@ -804,8 +817,6 @@ and is static. For non-scalar types, the result is nonstatic.
Attribute Pool_Address
======================
-.. index:: Parameters, when passed by reference
-
.. index:: Pool_Address
``X'Pool_Address`` for any object ``X`` returns the address
@@ -1129,6 +1140,26 @@ for compatibility with Ada 83. See
the Ada 83 reference manual for an exact description of the semantics of
this attribute when applied to floating-point types.
+Attribute Small_Denominator
+===========================
+.. index:: Small
+
+.. index:: Small_Denominator
+
+``typ'Small_Denominator`` for any fixed-point subtype `typ` yields the
+denominator in the representation of ``typ'Small`` as a rational number
+with coprime factors (i.e. as an irreducible fraction).
+
+Attribute Small_Numerator
+=========================
+.. index:: Small
+
+.. index:: Small_Numerator
+
+``typ'Small_Numerator`` for any fixed-point subtype `typ` yields the
+numerator in the representation of ``typ'Small`` as a rational number
+with coprime factors (i.e. as an irreducible fraction).
+
Attribute Storage_Unit
======================
.. index:: Storage_Unit
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
index 71e1834..10fcfc9 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
@@ -147,19 +147,33 @@ Type Representation
*
"The small of an ordinary fixed point type. See 3.5.9(8)."
-``Fine_Delta`` is 2**(-63)
+The small is the largest power of two that does not exceed the delta.
*
"What combinations of small, range, and digits are
supported for fixed point types. See 3.5.9(10)."
-Any combinations are permitted that do not result in a small less than
-``Fine_Delta`` and do not result in a mantissa larger than 63 bits.
-If the mantissa is larger than 53 bits on machines where Long_Long_Float
-is 64 bits (true of all architectures except x86), then the output from
-Text_IO is accurate to only 53 bits, rather than the full mantissa. This
-is because floating-point conversions are used to convert fixed point.
-
+For an ordinary fixed point type, on 32-bit platforms, the small must lie in
+2.0**(-80) .. 2.0**80 and the range in -9.0E+36 .. 9.0E+36; any combination
+is permitted that does not result in a mantissa larger than 63 bits.
+
+On 64-bit platforms, the small must lie in 2.0**(-127) .. 2.0**127 and the
+range in -1.0E+76 .. 1.0E+76; any combination is permitted that does not
+result in a mantissa larger than 63 bits, and any combination is permitted
+that results in a mantissa between 64 and 127 bits if the small is the
+ratio of two integers that lie in 1 .. 2.0**127.
+
+If the small is the ratio of two integers with 64-bit magnitude on 32-bit
+platforms and 128-bit magnitude on 64-bit platforms, which is the case if
+no ``small`` clause is provided, then the operations of the fixed point
+type are entirely implemented by means of integer instructions. In the
+other cases, some operations, in particular input and output, may be
+implemented by means of floating-point instructions and may be affected
+by accuracy issues on architectures other than x86.
+
+For a decimal fixed point type, on 32-bit platforms, the small must lie in
+1.0E-18 .. 1.0E+18 and the digits in 1 .. 18. On 64-bit platforms, the
+small must lie in 1.0E-38 .. 1.0E+38 and the digits in 1 .. 38.
*
"The result of ``Tags.Expanded_Name`` for types declared
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index e1e6853..74b9718 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -434,15 +434,16 @@ Syntax::
ASSERTION_KIND ::= RM_ASSERTION_KIND | ID_ASSERTION_KIND
- RM_ASSERTION_KIND ::= Assert |
- Static_Predicate |
- Dynamic_Predicate |
- Pre |
- Pre'Class |
- Post |
- Post'Class |
- Type_Invariant |
- Type_Invariant'Class
+ RM_ASSERTION_KIND ::= Assert |
+ Static_Predicate |
+ Dynamic_Predicate |
+ Pre |
+ Pre'Class |
+ Post |
+ Post'Class |
+ Type_Invariant |
+ Type_Invariant'Class |
+ Default_Initial_Condition
ID_ASSERTION_KIND ::= Assertions |
Assert_And_Cut |
@@ -450,6 +451,7 @@ Syntax::
Contract_Cases |
Debug |
Ghost |
+ Initial_Condition |
Invariant |
Invariant'Class |
Loop_Invariant |
@@ -458,7 +460,8 @@ Syntax::
Precondition |
Predicate |
Refined_Post |
- Statement_Assertions
+ Statement_Assertions |
+ Subprogram_Variant
POLICY_IDENTIFIER ::= Check | Disable | Ignore | Suppressible
@@ -5079,7 +5082,7 @@ Syntax:
.. code-block:: ada
- pragma Profile (Ravenscar | Restricted | Rational |
+ pragma Profile (Ravenscar | Restricted | Rational | Jorvik |
GNAT_Extended_Ravenscar | GNAT_Ravenscar_EDF );
@@ -5087,10 +5090,12 @@ This pragma is standard in Ada 2005, but is available in all earlier
versions of Ada as an implementation-defined pragma. This is a
configuration pragma that establishes a set of configuration pragmas
that depend on the argument. ``Ravenscar`` is standard in Ada 2005.
+``Jorvik`` is standard in Ada 202x.
The other possibilities (``Restricted``, ``Rational``,
``GNAT_Extended_Ravenscar``, ``GNAT_Ravenscar_EDF``)
-are implementation-defined. The set of configuration pragmas
-is defined in the following sections.
+are implementation-defined. ``GNAT_Extended_Ravenscar`` is an alias for ``Jorvik``.
+
+The set of configuration pragmas is defined in the following sections.
* Pragma Profile (Ravenscar)
@@ -5160,7 +5165,7 @@ is defined in the following sections.
* ``Simple_Barriers``
The Ravenscar profile also includes the following restrictions that specify
- that there are no semantic dependences on the corresponding predefined
+ that there are no semantic dependencies on the corresponding predefined
packages:
* ``No_Dependence => Ada.Asynchronous_Task_Control``
@@ -5201,12 +5206,10 @@ is defined in the following sections.
automatically causes the use of a simplified,
more efficient version of the tasking run-time library.
-* Pragma Profile (GNAT_Extended_Ravenscar)
+* Pragma Profile (Jorvik)
- This profile corresponds to a GNAT specific extension of the
- Ravenscar profile. The profile may change in the future although
- only in a compatible way: some restrictions may be removed or
- relaxed. It is defined as a variation of the Ravenscar profile.
+ ``Jorvik`` is the new profile added to the Ada 202x draft standard,
+ previously implemented under the name ``GNAT_Extended_Ravenscar``.
The ``No_Implicit_Heap_Allocations`` restriction has been replaced
by ``No_Implicit_Task_Allocations`` and
@@ -5218,6 +5221,13 @@ is defined in the following sections.
The ``Max_Protected_Entries``, ``Max_Entry_Queue_Length``, and
``No_Relative_Delay`` restrictions have been removed.
+ Details on the rationale for ``Jorvik`` and implications for use may be
+ found in :title:`A New Ravenscar-Based Profile` by P. Rogers, J. Ruiz,
+ T. Gingold and P. Bernardi, in :title:`Reliable Software Technologies --
+ Ada Europe 2017`, Springer-Verlag Lecture Notes in Computer Science,
+ Number 10300.
+
+
* Pragma Profile (GNAT_Ravenscar_EDF)
This profile corresponds to the Ravenscar profile but using
@@ -6642,8 +6652,8 @@ expression. The following is an example of use within a package spec:
function Sqrt (Arg : Float) return Float;
pragma Test_Case (Name => "Test 1",
Mode => Nominal,
- Requires => Arg < 10000,
- Ensures => Sqrt'Result < 10);
+ Requires => Arg < 10000.0,
+ Ensures => Sqrt'Result < 10.0);
...
end Math_Functions;
diff --git a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst
index bf9f0b9e..e448816 100644
--- a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst
+++ b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst
@@ -217,7 +217,9 @@ The formal parameter names can be anything.
A more convenient way of providing these shift operators is to use
the Provide_Shift_Operators pragma, which provides the function declarations
-and corresponding pragma Import's for all five shift functions.
+and corresponding pragma Import's for all five shift functions. Note that in
+using these provided shift operations, shifts performed on negative numbers
+will result in modification of the sign bit.
.. _Source_Location:
diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
index 1dec487..82e992a 100644
--- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
+++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst
@@ -1517,6 +1517,13 @@ Alphabetical List of All Switches
an exception because ``Self(Obj)`` produces an anonymous object which does
not share the memory location of ``Obj``.
+.. index:: -gnateb (gcc)
+
+:switch:`-gnateb`
+ Store configuration files by their basename in ALI files. This switch is
+ used for instance by gprbuild for distributed builds in order to prevent
+ issues where machine-specific absolute paths could end up being stored in
+ ALI files.
.. index:: -gnatec (gcc)
@@ -3337,7 +3344,7 @@ of the pragma in the :title:`GNAT_Reference_manual`).
:switch:`-gnatw.K`
*Suppress warnings on redefinition of names in standard.*
- This switch activates warnings for declarations that declare a name that
+ This switch disables warnings for declarations that declare a name that
is defined in package Standard.
@@ -4807,7 +4814,8 @@ checks to be performed. The following checks are defined:
All keywords must be in lower case (with the exception of keywords
such as ``digits`` used as attribute names to which this check
- does not apply).
+ does not apply). A single error is reported for each line breaking
+ this rule even if multiple casing issues exist on a same line.
.. index:: -gnatyl (gcc)
@@ -6703,6 +6711,9 @@ be presented in subsequent sections.
Use the target-independent XDR protocol for stream oriented attributes
instead of the default implementation which is based on direct binary
representations and is therefore target-and endianness-dependent.
+ However it does not support 128-bit integer types and the exception
+ ``Ada.IO_Exceptions.Device_Error`` is raised if any attempt is made
+ at streaming 128-bit integer types with it.
.. index:: -Xnnn (gnatbind)
diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
index ba2c9b6..c4f186e 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
@@ -1840,7 +1840,7 @@ improves performance for your program.
.. _Floating_Point_Operations:
-Floating_Point_Operations
+Floating Point Operations
^^^^^^^^^^^^^^^^^^^^^^^^^
.. index:: Floating-Point Operations
diff --git a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
index 5c51222..f152ce3 100644
--- a/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
+++ b/gcc/ada/doc/gnat_ugn/gnat_utility_programs.rst
@@ -1920,8 +1920,8 @@ building specialized scripts.
:switch:`--comments-fill`
- Fill comment blocks. This is the default.
- Use :switch:`--no-comments-fill` to turn off filling.
+ Fill comment blocks.
+ The default is :switch:`--no-comments-fill`.
:switch:`--comments-special`
diff --git a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
index 2f0e10c..46d589a 100644
--- a/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
+++ b/gcc/ada/doc/gnat_ugn/the_gnat_compilation_model.rst
@@ -1560,6 +1560,10 @@ temporary files that are immediately deleted; it doesn't make sense to
depend on a file that no longer exists. Such tools include
``gprbuild``, ``gnatmake``, and ``gnatcheck``.
+By default, configuration pragma files are stored by their absolute paths in
+ALI files. You can use the :switch:`-gnateb` switch in order to store them by
+their basename instead.
+
If you are using project file, a separate mechanism is provided using
project attributes.