diff options
Diffstat (limited to 'gcc/ada/doc/gnat_rm')
17 files changed, 2539 insertions, 2366 deletions
diff --git a/gcc/ada/doc/gnat_rm/about_this_guide.rst b/gcc/ada/doc/gnat_rm/about_this_guide.rst index 8071b42..b48785e 100644 --- a/gcc/ada/doc/gnat_rm/about_this_guide.rst +++ b/gcc/ada/doc/gnat_rm/about_this_guide.rst @@ -130,14 +130,14 @@ Conventions Following are examples of the typographical and graphic conventions used in this guide: -* `Functions`, `utility program names`, `standard names`, - and `classes`. +* ``Functions``, ``utility program names``, ``standard names``, + and ``classes``. -* `Option flags` +* ``Option flags`` * :file:`File names` -* `Variables` +* ``Variables`` * *Emphasis* diff --git a/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst b/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst index a859761..5a20995 100644 --- a/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst +++ b/gcc/ada/doc/gnat_rm/compatibility_and_porting_guide.rst @@ -16,7 +16,7 @@ Writing Portable Fixed-Point Declarations ========================================= The Ada Reference Manual gives an implementation freedom to choose bounds -that are narrower by `Small` from the given bounds. +that are narrower by ``Small`` from the given bounds. For example, if we write .. code-block:: ada @@ -31,7 +31,7 @@ look at this, and figure out how to avoid these problems. First, why does this freedom exist, and why would an implementation take advantage of it? To answer this, take a closer look at the type -declaration for `F1` above. If the compiler uses the given bounds, +declaration for ``F1`` above. If the compiler uses the given bounds, it would need 9 bits to hold the largest positive value (and typically that means 16 bits on all machines). But if the implementation chooses the +127.0 bound then it can fit values of the type in 8 bits. @@ -67,7 +67,7 @@ We could imagine three types of implementation: (a) those that narrow the range automatically if they can figure out that the narrower range will allow storage in a smaller machine unit, -(b) those that will narrow only if forced to by a `'Size` clause, and +(b) those that will narrow only if forced to by a ``'Size`` clause, and (c) those that will never narrow. @@ -90,9 +90,9 @@ and no real compiler would do this. All real compilers will fall into one of the categories (a), (b) or (c) above. So, how do you get the compiler to do what you want? The answer is give the -actual bounds you want, and then use a `'Small` clause and a -`'Size` clause to absolutely pin down what the compiler does. -E.g., for `F2` above, we will write: +actual bounds you want, and then use a ``'Small`` clause and a +``'Size`` clause to absolutely pin down what the compiler does. +E.g., for ``F2`` above, we will write: .. code-block:: ada @@ -161,7 +161,7 @@ Ada 95 and later versions of the standard: * *Character literals* Some uses of character literals are ambiguous. Since Ada 95 has introduced - `Wide_Character` as a new predefined character type, some uses of + ``Wide_Character`` as a new predefined character type, some uses of character literals that were legal in Ada 83 are illegal in Ada 95. For example: @@ -170,7 +170,7 @@ Ada 95 and later versions of the standard: for Char in 'A' .. 'Z' loop ... end loop; The problem is that 'A' and 'Z' could be from either - `Character` or `Wide_Character`. The simplest correction + ``Character`` or ``Wide_Character``. The simplest correction is to make the type explicit; e.g.: .. code-block:: ada @@ -179,8 +179,8 @@ Ada 95 and later versions of the standard: * *New reserved words* - The identifiers `abstract`, `aliased`, `protected`, - `requeue`, `tagged`, and `until` are reserved in Ada 95. + The identifiers ``abstract``, ``aliased``, ``protected``, + ``requeue``, ``tagged``, and ``until`` are reserved in Ada 95. Existing Ada 83 code using any of these identifiers must be edited to use some alternative name. @@ -207,38 +207,38 @@ Ada 95 and later versions of the standard: body if it is empty, or, if it is non-empty, introduce a dummy declaration into the spec that makes the body required. One approach is to add a private part to the package declaration (if necessary), and define a parameterless - procedure called `Requires_Body`, which must then be given a dummy + procedure called ``Requires_Body``, which must then be given a dummy procedure body in the package body, which then becomes required. Another approach (assuming that this does not introduce elaboration - circularities) is to add an `Elaborate_Body` pragma to the package spec, + circularities) is to add an ``Elaborate_Body`` pragma to the package spec, since one effect of this pragma is to require the presence of a package body. * *Numeric_Error is the same exception as Constraint_Error* - In Ada 95, the exception `Numeric_Error` is a renaming of `Constraint_Error`. + In Ada 95, the exception ``Numeric_Error`` is a renaming of ``Constraint_Error``. This means that it is illegal to have separate exception handlers for the two exceptions. The fix is simply to remove the handler for the - `Numeric_Error` case (since even in Ada 83, a compiler was free to raise - `Constraint_Error` in place of `Numeric_Error` in all cases). + ``Numeric_Error`` case (since even in Ada 83, a compiler was free to raise + ``Constraint_Error`` in place of ``Numeric_Error`` in all cases). * *Indefinite subtypes in generics* - In Ada 83, it was permissible to pass an indefinite type (e.g, `String`) + In Ada 83, it was permissible to pass an indefinite type (e.g, ``String``) as the actual for a generic formal private type, but then the instantiation would be illegal if there were any instances of declarations of variables of this type in the generic body. In Ada 95, to avoid this clear violation of the methodological principle known as the 'contract model', the generic declaration explicitly indicates whether or not such instantiations are permitted. If a generic formal parameter - has explicit unknown discriminants, indicated by using `(<>)` after the + has explicit unknown discriminants, indicated by using ``(<>)`` after the subtype name, then it can be instantiated with indefinite types, but no stand-alone variables can be declared of this type. Any attempt to declare such a variable will result in an illegality at the time the generic is - declared. If the `(<>)` notation is not used, then it is illegal + declared. If the ``(<>)`` notation is not used, then it is illegal to instantiate the generic with an indefinite type. This is the potential incompatibility issue when porting Ada 83 code to Ada 95. It will show up as a compile time error, and - the fix is usually simply to add the `(<>)` to the generic declaration. + the fix is usually simply to add the ``(<>)`` to the generic declaration. .. _More_deterministic_semantics: @@ -273,21 +273,21 @@ The worst kind of incompatibility is one where a program that is legal in Ada 83 is also legal in Ada 95 but can have an effect in Ada 95 that was not possible in Ada 83. Fortunately this is extremely rare, but the one situation that you should be alert to is the change in the predefined type -`Character` from 7-bit ASCII to 8-bit Latin-1. +``Character`` from 7-bit ASCII to 8-bit Latin-1. .. index:: Latin-1 -* *Range of type `Character`* +* *Range of type ``Character``* - The range of `Standard.Character` is now the full 256 characters + The range of ``Standard.Character`` is now the full 256 characters of Latin-1, whereas in most Ada 83 implementations it was restricted to 128 characters. Although some of the effects of this change will be manifest in compile-time rejection of legal Ada 83 programs it is possible for a working Ada 83 program to have a different effect in Ada 95, one that was not permitted in Ada 83. As an example, the expression - `Character'Pos(Character'Last)` returned `127` in Ada 83 and now - delivers `255` as its value. + ``Character'Pos(Character'Last)`` returned ``127`` in Ada 83 and now + delivers ``255`` as its value. In general, you should look at the logic of any character-processing Ada 83 program and see whether it needs to be adapted to work correctly with Latin-1. Note that the predefined Ada 95 API has a @@ -313,7 +313,7 @@ Other language compatibility issues as identifiers as in Ada 83. However, in practice, it is usually advisable to make the necessary modifications to the program to remove the need for using this switch. - See the `Compiling Different Versions of Ada` section in + See the ``Compiling Different Versions of Ada`` section in the :title:`GNAT User's Guide`. @@ -324,8 +324,8 @@ Other language compatibility issues compilers are allowed, but not required, to implement these missing elements. In contrast with some other compilers, GNAT implements all such pragmas and attributes, eliminating this compatibility concern. These - include `pragma Interface` and the floating point type attributes - (`Emax`, `Mantissa`, etc.), among other items. + include ``pragma Interface`` and the floating point type attributes + (``Emax``, ``Mantissa``, etc.), among other items. .. _Compatibility_between_Ada_95_and_Ada_2005: @@ -343,7 +343,7 @@ for a complete description please see the * *New reserved words.* - The words `interface`, `overriding` and `synchronized` are + The words ``interface``, ``overriding`` and ``synchronized`` are reserved in Ada 2005. A pre-Ada 2005 program that uses any of these as an identifier will be illegal. @@ -351,12 +351,12 @@ for a complete description please see the * *New declarations in predefined packages.* A number of packages in the predefined environment contain new declarations: - `Ada.Exceptions`, `Ada.Real_Time`, `Ada.Strings`, - `Ada.Strings.Fixed`, `Ada.Strings.Bounded`, - `Ada.Strings.Unbounded`, `Ada.Strings.Wide_Fixed`, - `Ada.Strings.Wide_Bounded`, `Ada.Strings.Wide_Unbounded`, - `Ada.Tags`, `Ada.Text_IO`, and `Interfaces.C`. - If an Ada 95 program does a `with` and `use` of any of these + ``Ada.Exceptions``, ``Ada.Real_Time``, ``Ada.Strings``, + ``Ada.Strings.Fixed``, ``Ada.Strings.Bounded``, + ``Ada.Strings.Unbounded``, ``Ada.Strings.Wide_Fixed``, + ``Ada.Strings.Wide_Bounded``, ``Ada.Strings.Wide_Unbounded``, + ``Ada.Tags``, ``Ada.Text_IO``, and ``Interfaces.C``. + If an Ada 95 program does a ``with`` and ``use`` of any of these packages, the new declarations may cause name clashes. * *Access parameters.* @@ -382,7 +382,7 @@ for a complete description please see the are now ambiguous. The ambiguity may be resolved either by applying a type conversion to the expression, or by explicitly invoking the operation from package - `Standard`. + ``Standard``. * *Return-by-reference types.* @@ -411,17 +411,17 @@ Implementation-defined pragmas Ada compilers are allowed to supplement the language-defined pragmas, and these are a potential source of non-portability. All GNAT-defined pragmas -are described in the `Implementation Defined Pragmas` chapter of the -:title:`GNAT Reference Manual`, and these include several that are specifically +are described in :ref:`Implementation_Defined_Pragmas`, +and these include several that are specifically intended to correspond to other vendors' Ada 83 pragmas. -For migrating from VADS, the pragma `Use_VADS_Size` may be useful. +For migrating from VADS, the pragma ``Use_VADS_Size`` may be useful. For compatibility with HP Ada 83, GNAT supplies the pragmas -`Extend_System`, `Ident`, `Inline_Generic`, -`Interface_Name`, `Passive`, `Suppress_All`, -and `Volatile`. -Other relevant pragmas include `External` and `Link_With`. +``Extend_System``, ``Ident``, ``Inline_Generic``, +``Interface_Name``, ``Passive``, ``Suppress_All``, +and ``Volatile``. +Other relevant pragmas include ``External`` and ``Link_With``. Some vendor-specific -Ada 83 pragmas (`Share_Generic`, `Subtitle`, and `Title`) are +Ada 83 pragmas (``Share_Generic``, ``Subtitle``, and ``Title``) are recognized, thus avoiding compiler rejection of units that contain such pragmas; they are not relevant in a GNAT context and hence are not otherwise implemented. @@ -434,12 +434,12 @@ Implementation-defined attributes Analogous to pragmas, the set of attributes may be extended by an implementation. All GNAT-defined attributes are described in -`Implementation Defined Attributes` section of the -:title:`GNAT Reference Manual`, and these include several that are specifically intended +:ref:`Implementation_Defined_Attributes`, +and these include several that are specifically intended to correspond to other vendors' Ada 83 attributes. For migrating from VADS, -the attribute `VADS_Size` may be useful. For compatibility with HP -Ada 83, GNAT supplies the attributes `Bit`, `Machine_Size` and -`Type_Class`. +the attribute ``VADS_Size`` may be useful. For compatibility with HP +Ada 83, GNAT supplies the attributes ``Bit``, ``Machine_Size`` and +``Type_Class``. .. _Libraries: @@ -474,11 +474,11 @@ Program_Error being raised due to an 'Access Before Elaboration': an attempt to invoke a subprogram before its body has been elaborated, or to instantiate a generic before the generic body has been elaborated. By default GNAT attempts to choose a safe order (one that will not encounter access before -elaboration problems) by implicitly inserting `Elaborate` or -`Elaborate_All` pragmas where +elaboration problems) by implicitly inserting ``Elaborate`` or +``Elaborate_All`` pragmas where needed. However, this can lead to the creation of elaboration circularities and a resulting rejection of the program by gnatbind. This issue is -thoroughly described in the `Elaboration Order Handling in GNAT` appendix +thoroughly described in the *Elaboration Order Handling in GNAT* appendix in the :title:`GNAT User's Guide`. In brief, there are several ways to deal with this situation: @@ -486,12 +486,12 @@ ways to deal with this situation: * Modify the program to eliminate the circularities, e.g., by moving elaboration-time code into explicitly-invoked procedures -* Constrain the elaboration order by including explicit `Elaborate_Body` or - `Elaborate` pragmas, and then inhibit the generation of implicit - `Elaborate_All` +* Constrain the elaboration order by including explicit ``Elaborate_Body`` or + ``Elaborate`` pragmas, and then inhibit the generation of implicit + ``Elaborate_All`` pragmas either globally (as an effect of the *-gnatE* switch) or locally (by selectively suppressing elaboration checks via pragma - `Suppress(Elaboration_Check)` when it is safe to do so). + ``Suppress(Elaboration_Check)`` when it is safe to do so). .. _Target-specific_aspects: @@ -581,14 +581,14 @@ the cases most likely to arise in existing Ada 83 code. Reference Manuals as implementation advice that is followed by GNAT. The problem will show up as an error message rejecting the size clause. The fix is simply to provide - the explicit pragma `Pack`, or for more fine tuned control, provide + the explicit pragma ``Pack``, or for more fine tuned control, provide a Component_Size clause. * *Meaning of Size Attribute* The Size attribute in Ada 95 (and Ada 2005) for discrete types is defined as the minimal number of bits required to hold values of the type. For example, - on a 32-bit machine, the size of `Natural` will typically be 31 and not + on a 32-bit machine, the size of ``Natural`` will typically be 31 and not 32 (since no sign bit is required). Some Ada 83 compilers gave 31, and some 32 in this situation. This problem will usually show up as a compile time error, but not always. It is a good idea to check all uses of the diff --git a/gcc/ada/doc/gnat_rm/implementation_advice.rst b/gcc/ada/doc/gnat_rm/implementation_advice.rst index c505e31..b006f32 100644 --- a/gcc/ada/doc/gnat_rm/implementation_advice.rst +++ b/gcc/ada/doc/gnat_rm/implementation_advice.rst @@ -32,7 +32,7 @@ RM 1.1.3(20): Error Detection ============================= "If an implementation detects the use of an unsupported Specialized Needs - Annex feature at run time, it should raise `Program_Error` if + Annex feature at run time, it should raise ``Program_Error`` if feasible." Not relevant. All specialized needs annex features are either supported, @@ -56,7 +56,7 @@ RM 1.1.5(12): Bounded Errors ============================ "If an implementation detects a bounded error or erroneous - execution, it should raise `Program_Error`." + execution, it should raise ``Program_Error``." Followed in all cases in which the implementation detects a bounded error or erroneous execution. Not all such situations are detected at @@ -111,10 +111,10 @@ RM 2.8(17-19): Pragmas "Normally, an implementation should not define pragmas that can make an illegal program legal, except as follows: - * A pragma used to complete a declaration, such as a pragma `Import`; + * A pragma used to complete a declaration, such as a pragma ``Import``; * A pragma used to configure the environment by adding, removing, or - replacing `library_items`." + replacing ``library_items``." See :ref:`RM_2_8_16_Pragmas`. @@ -126,15 +126,15 @@ RM 3.5.2(5): Alternative Character Sets ======================================= "If an implementation supports a mode with alternative interpretations - for `Character` and `Wide_Character`, the set of graphic - characters of `Character` should nevertheless remain a proper - subset of the set of graphic characters of `Wide_Character`. Any + for ``Character`` and ``Wide_Character``, the set of graphic + characters of ``Character`` should nevertheless remain a proper + subset of the set of graphic characters of ``Wide_Character``. Any character set 'localizations' should be reflected in the results of the subprograms defined in the language-defined package - `Characters.Handling` (see A.3) available in such a mode. In a mode with - an alternative interpretation of `Character`, the implementation should + ``Characters.Handling`` (see A.3) available in such a mode. In a mode with + an alternative interpretation of ``Character``, the implementation should also support a corresponding change in what is a legal - `identifier_letter`." + ``identifier_letter``." Not all wide character modes follow this advice, in particular the JIS and IEC modes reflect standard usage in Japan, and in these encoding, @@ -148,13 +148,13 @@ there is no such restriction. RM 3.5.4(28): Integer Types =========================== - "An implementation should support `Long_Integer` in addition to - `Integer` if the target machine supports 32-bit (or longer) + "An implementation should support ``Long_Integer`` in addition to + ``Integer`` if the target machine supports 32-bit (or longer) arithmetic. No other named integer subtypes are recommended for package - `Standard`. Instead, appropriate named integer subtypes should be - provided in the library package `Interfaces` (see B.2)." + ``Standard``. Instead, appropriate named integer subtypes should be + provided in the library package ``Interfaces`` (see B.2)." -`Long_Integer` is supported. Other standard integer types are supported +``Long_Integer`` is supported. Other standard integer types are supported so this advice is not fully followed. These types are supported for convenient interface to C, and so that all hardware types of the machine are easily available. @@ -164,7 +164,7 @@ RM 3.5.4(29): Integer Types "An implementation for a two's complement machine should support modular types with a binary modulus up to ``System.Max_Int*2+2``. An - implementation should support a non-binary modules up to `Integer'Last`." + implementation should support a non-binary modules up to ``Integer'Last``." Followed. @@ -177,7 +177,7 @@ RM 3.5.5(8): Enumeration Values subtype, if the value of the operand does not correspond to the internal code for any enumeration literal of its type (perhaps due to an un-initialized variable), then the implementation should raise - `Program_Error`. This is particularly important for enumeration + ``Program_Error``. This is particularly important for enumeration types with noncontiguous internal codes specified by an enumeration_representation_clause." @@ -188,19 +188,19 @@ Followed. RM 3.5.7(17): Float Types ========================= - "An implementation should support `Long_Float` in addition to - `Float` if the target machine supports 11 or more digits of + "An implementation should support ``Long_Float`` in addition to + ``Float`` if the target machine supports 11 or more digits of precision. No other named floating point subtypes are recommended for - package `Standard`. Instead, appropriate named floating point subtypes - should be provided in the library package `Interfaces` (see B.2)." + package ``Standard``. Instead, appropriate named floating point subtypes + should be provided in the library package ``Interfaces`` (see B.2)." -`Short_Float` and `Long_Long_Float` are also provided. The +``Short_Float`` and ``Long_Long_Float`` are also provided. The former provides improved compatibility with other implementations supporting this type. The latter corresponds to the highest precision floating-point type supported by the hardware. On most machines, this -will be the same as `Long_Float`, but on some machines, it will +will be the same as ``Long_Float``, but on some machines, it will correspond to the IEEE extended form. The notable case is all ia32 -(x86) implementations, where `Long_Long_Float` corresponds to +(x86) implementations, where ``Long_Long_Float`` corresponds to the 80-bit extended precision format supported in hardware on this processor. Note that the 128-bit format on SPARC is not supported, since this is a software rather than a hardware format. @@ -214,9 +214,9 @@ RM 3.6.2(11): Multidimensional Arrays "An implementation should normally represent multidimensional arrays in row-major order, consistent with the notation used for multidimensional - array aggregates (see 4.3.3). However, if a pragma `Convention` - (`Fortran`, ...) applies to a multidimensional array type, then - column-major order should be used instead (see B.5, `Interfacing with Fortran`)." + array aggregates (see 4.3.3). However, if a pragma ``Convention`` + (``Fortran``, ...) applies to a multidimensional array type, then + column-major order should be used instead (see B.5, *Interfacing with Fortran*)." Followed. @@ -225,13 +225,13 @@ Followed. RM 9.6(30-31): Duration'Small ============================= - "Whenever possible in an implementation, the value of `Duration'Small` + "Whenever possible in an implementation, the value of ``Duration'Small`` should be no greater than 100 microseconds." -Followed. (`Duration'Small` = 10**(-9)). +Followed. (``Duration'Small`` = 10**(-9)). - "The time base for `delay_relative_statements` should be monotonic; - it need not be the same time base as used for `Calendar.Clock`." + "The time base for ``delay_relative_statements`` should be monotonic; + it need not be the same time base as used for ``Calendar.Clock``." Followed. @@ -255,23 +255,23 @@ advice without severely impacting efficiency of execution. RM 11.4.1(19): Exception Information ==================================== - "`Exception_Message` by default and `Exception_Information` + "``Exception_Message`` by default and ``Exception_Information`` should produce information useful for - debugging. `Exception_Message` should be short, about one - line. `Exception_Information` can be long. `Exception_Message` + debugging. ``Exception_Message`` should be short, about one + line. ``Exception_Information`` can be long. ``Exception_Message`` should not include the - `Exception_Name`. `Exception_Information` should include both - the `Exception_Name` and the `Exception_Message`." + ``Exception_Name``. ``Exception_Information`` should include both + the ``Exception_Name`` and the ``Exception_Message``." Followed. For each exception that doesn't have a specified -`Exception_Message`, the compiler generates one containing the location +``Exception_Message``, the compiler generates one containing the location of the raise statement. This location has the form 'file_name:line', where file_name is the short file name (without path information) and line is the line number in the file. Note that in the case of the Zero Cost Exception mechanism, these messages become redundant with the Exception_Information that contains a full backtrace of the calling sequence, so they are disabled. To disable explicitly the generation of the source location message, use the -Pragma `Discard_Names`. +Pragma ``Discard_Names``. .. index:: Suppression of checks @@ -312,7 +312,7 @@ For example: for Y'Address use X'Address;>> - "An implementation need not support a specification for the `Size` + "An implementation need not support a specification for the ``Size`` for a given composite subtype, nor the size or storage place for an object (including a component) of a given composite subtype, unless the constraints on the subtype and its composite subcomponents (if any) are @@ -337,13 +337,13 @@ RM 13.2(6-8): Packed Types speed of accessing components, subject to reasonable complexity in addressing calculations. - The recommended level of support pragma `Pack` is: + The recommended level of support pragma ``Pack`` is: For a packed record type, the components should be packed as tightly as possible subject to the Sizes of the component subtypes, and subject to - any `record_representation_clause` that applies to the type; the + any *record_representation_clause* that applies to the type; the implementation may, but need not, reorder components or cross aligned - word boundaries to improve the packing. A component whose `Size` is + word boundaries to improve the packing. A component whose ``Size`` is greater than the word size may be allocated an integral number of words." Followed. Tight packing of arrays is supported for all component sizes @@ -364,22 +364,22 @@ Followed. RM 13.3(14-19): Address Clauses =============================== - "For an array `X`, ``X'Address`` should point at the first + "For an array ``X``, ``X'Address`` should point at the first component of the array, and not at the array bounds." Followed. - "The recommended level of support for the `Address` attribute is: + "The recommended level of support for the ``Address`` attribute is: - ``X'Address`` should produce a useful result if `X` is an + ``X'Address`` should produce a useful result if ``X`` is an object that is aliased or of a by-reference type, or is an entity whose - `Address` has been specified." + ``Address`` has been specified." Followed. A valid address will be produced even if none of those conditions have been met. If necessary, the object is forced into memory to ensure the address is valid. - "An implementation should support `Address` clauses for imported + "An implementation should support ``Address`` clauses for imported subprograms." Followed. @@ -389,7 +389,7 @@ Followed. Followed. - "If the `Address` of an object is specified, or it is imported or exported, + "If the ``Address`` of an object is specified, or it is imported or exported, then the implementation should not perform optimizations based on assumptions of no aliases." @@ -400,7 +400,7 @@ Followed. RM 13.3(29-35): Alignment Clauses ================================= - "The recommended level of support for the `Alignment` attribute for + "The recommended level of support for the ``Alignment`` attribute for subtypes is: An implementation should support specified Alignments that are factors @@ -416,12 +416,12 @@ Followed. Followed. "An implementation need not support specified Alignments that are - greater than the maximum `Alignment` the implementation ever returns by + greater than the maximum ``Alignment`` the implementation ever returns by default." Followed. - "The recommended level of support for the `Alignment` attribute for + "The recommended level of support for the ``Alignment`` attribute for objects is: Same as above, for subtypes, but in addition:" @@ -440,23 +440,23 @@ Followed. RM 13.3(42-43): Size Clauses ============================ - "The recommended level of support for the `Size` attribute of + "The recommended level of support for the ``Size`` attribute of objects is: - A `Size` clause should be supported for an object if the specified - `Size` is at least as large as its subtype's `Size`, and + A ``Size`` clause should be supported for an object if the specified + ``Size`` is at least as large as its subtype's ``Size``, and corresponds to a size in storage elements that is a multiple of the - object's `Alignment` (if the `Alignment` is nonzero)." + object's ``Alignment`` (if the ``Alignment`` is nonzero)." Followed. RM 13.3(50-56): Size Clauses ============================ - "If the `Size` of a subtype is specified, and allows for efficient + "If the ``Size`` of a subtype is specified, and allows for efficient independent addressability (see 9.10) on the target architecture, then - the `Size` of the following objects of the subtype should equal the - `Size` of the subtype: + the ``Size`` of the following objects of the subtype should equal the + ``Size`` of the subtype: Aliased objects (including components)." @@ -468,18 +468,18 @@ Followed. Followed. But note that this can be overridden by use of the implementation pragma Implicit_Packing in the case of packed arrays. - "The recommended level of support for the `Size` attribute of subtypes is: + "The recommended level of support for the ``Size`` attribute of subtypes is: - The `Size` (if not specified) of a static discrete or fixed point + The ``Size`` (if not specified) of a static discrete or fixed point subtype should be the number of bits needed to represent each value belonging to the subtype using an unbiased representation, leaving space for a sign bit only if the subtype contains negative values. If such a subtype is a first subtype, then an implementation should support a - specified `Size` for it that reflects this representation." + specified ``Size`` for it that reflects this representation." Followed. - "For a subtype implemented with levels of indirection, the `Size` + "For a subtype implemented with levels of indirection, the ``Size`` should include the size of the pointers, but not the size of what they point at." @@ -490,11 +490,11 @@ Followed. RM 13.3(71-73): Component Size Clauses ====================================== - "The recommended level of support for the `Component_Size` + "The recommended level of support for the ``Component_Size`` attribute is: - An implementation need not support specified `Component_Sizes` that are - less than the `Size` of the component subtype." + An implementation need not support specified ``Component_Sizes`` that are + less than the ``Size`` of the component subtype." Followed. @@ -520,7 +520,7 @@ RM 13.4(9-10): Enumeration Representation Clauses An implementation need not support enumeration representation clauses for boolean types, but should at minimum support the internal codes in - the range `System.Min_Int .. System.Max_Int`." + the range ``System.Min_Int .. System.Max_Int``." Followed. @@ -532,7 +532,7 @@ RM 13.5.1(17-22): Record Representation Clauses =============================================== "The recommended level of support for - `record_representation_clauses` is: + *record_representation_clause*\ s is: An implementation should support storage places that can be extracted with a load, mask, shift sequence of machine code, and set with a load, @@ -542,13 +542,13 @@ RM 13.5.1(17-22): Record Representation Clauses Followed. "A storage place should be supported if its size is equal to the - `Size` of the component subtype, and it starts and ends on a - boundary that obeys the `Alignment` of the component subtype." + ``Size`` of the component subtype, and it starts and ends on a + boundary that obeys the ``Alignment`` of the component subtype." Followed. "If the default bit ordering applies to the declaration of a given type, - then for a component whose subtype's `Size` is less than the word + then for a component whose subtype's ``Size`` is less than the word size, any storage place that does not cross an aligned word boundary should be supported." @@ -561,7 +561,7 @@ Followed. The storage place for the tag field is the beginning of the tagged record, and its size is Address'Size. GNAT will reject an explicit component clause for the tag field. - "An implementation need not support a `component_clause` for a + "An implementation need not support a *component_clause* for a component of an extension part if the storage place is not after the storage places of all components of the parent type, whether or not those storage places had been specified." @@ -591,7 +591,7 @@ RM 13.5.3(7-8): Bit Ordering "The recommended level of support for the non-default bit ordering is: - If `Word_Size` = `Storage_Unit`, then the implementation + If ``Word_Size`` = ``Storage_Unit``, then the implementation should support the non-default bit ordering in addition to the default bit ordering." @@ -607,33 +607,33 @@ RM 13.7(37): Address as Private Followed. -.. index:: Operations, on `Address` +.. index:: Operations, on ``Address`` .. index:: Address, operations of RM 13.7.1(16): Address Operations ================================= - "Operations in `System` and its children should reflect the target + "Operations in ``System`` and its children should reflect the target environment semantics as closely as is reasonable. For example, on most machines, it makes sense for address arithmetic to 'wrap around'. - Operations that do not make sense should raise `Program_Error`." + Operations that do not make sense should raise ``Program_Error``." Followed. Address arithmetic is modular arithmetic that wraps around. No -operation raises `Program_Error`, since all operations make sense. +operation raises ``Program_Error``, since all operations make sense. .. index:: Unchecked conversion RM 13.9(14-17): Unchecked Conversion ==================================== - "The `Size` of an array object should not include its bounds; hence, + "The ``Size`` of an array object should not include its bounds; hence, the bounds should not be part of the converted data." Followed. "The implementation should not generate unnecessary run-time checks to - ensure that the representation of `S` is a representation of the + ensure that the representation of ``S`` is a representation of the target type. It should take advantage of the permission to return by reference when possible. Restrictions on unchecked conversions should be avoided unless required by the target environment." @@ -696,7 +696,7 @@ Followed. RM 13.11.2(17): Unchecked Deallocation ====================================== - "For a standard storage pool, `Free` should actually reclaim the + "For a standard storage pool, ``Free`` should actually reclaim the storage." Followed. @@ -707,8 +707,8 @@ RM 13.13.2(17): Stream Oriented Attributes ========================================== "If a stream element is the same size as a storage element, then the - normal in-memory representation should be used by `Read` and - `Write` for scalar objects. Otherwise, `Read` and `Write` + normal in-memory representation should be used by ``Read`` and + ``Write`` for scalar objects. Otherwise, ``Read`` and ``Write`` should use the smallest number of stream elements needed to represent all values in the base range of the scalar type." @@ -717,7 +717,7 @@ which specifies using the size of the first subtype. However, such an implementation is based on direct binary representations and is therefore target- and endianness-dependent. To address this issue, GNAT also supplies an alternate implementation -of the stream attributes `Read` and `Write`, +of the stream attributes ``Read`` and ``Write``, which uses the target-independent XDR standard representation for scalar types. @@ -730,13 +730,13 @@ for scalar types. .. index:: Stream oriented attributes The XDR implementation is provided as an alternative body of the -`System.Stream_Attributes` package, in the file +``System.Stream_Attributes`` package, in the file :file:`s-stratt-xdr.adb` in the GNAT library. There is no :file:`s-stratt-xdr.ads` file. In order to install the XDR implementation, do the following: * Replace the default implementation of the - `System.Stream_Attributes` package with the XDR implementation. + ``System.Stream_Attributes`` package with the XDR implementation. For example on a Unix platform issue the commands: .. code-block:: sh @@ -747,7 +747,7 @@ In order to install the XDR implementation, do the following: * Rebuild the GNAT run-time library as documented in - the `GNAT and Libraries` section of the :title:`GNAT User's Guide`. + the *GNAT and Libraries* section of the :title:`GNAT User's Guide`. RM A.1(52): Names of Predefined Numeric Types ============================================= @@ -762,12 +762,12 @@ Followed. .. index:: Ada.Characters.Handling -RM A.3.2(49): `Ada.Characters.Handling` -======================================= +RM A.3.2(49): ``Ada.Characters.Handling`` +========================================= - "If an implementation provides a localized definition of `Character` - or `Wide_Character`, then the effects of the subprograms in - `Characters.Handling` should reflect the localizations. + "If an implementation provides a localized definition of ``Character`` + or ``Wide_Character``, then the effects of the subprograms in + ``Characters.Handling`` should reflect the localizations. See also 3.5.2." Followed. GNAT provides no such localized definitions. @@ -787,14 +787,14 @@ Followed. No implicit pointers or dynamic allocation are used. RM A.5.2(46-47): Random Number Generation ========================================= - "Any storage associated with an object of type `Generator` should be + "Any storage associated with an object of type ``Generator`` should be reclaimed on exit from the scope of the object." Followed. "If the generator period is sufficiently long in relation to the number of distinct initiator values, then each possible value of - `Initiator` passed to `Reset` should initiate a sequence of + ``Initiator`` passed to ``Reset`` should initiate a sequence of random numbers that does not, in a practical sense, overlap the sequence initiated by any other value. If this is not possible, then the mapping between initiator values and generator states should be a rapidly @@ -805,55 +805,55 @@ condition here to hold true. .. index:: Get_Immediate -RM A.10.7(23): `Get_Immediate` -============================== +RM A.10.7(23): ``Get_Immediate`` +================================ - "The `Get_Immediate` procedures should be implemented with + "The ``Get_Immediate`` procedures should be implemented with unbuffered input. For a device such as a keyboard, input should be available if a key has already been typed, whereas for a disk file, input should always be available except at end of file. For a file associated with a keyboard-like device, any line-editing features of the underlying operating system should be disabled during the execution of - `Get_Immediate`." + ``Get_Immediate``." Followed on all targets except VxWorks. For VxWorks, there is no way to provide this functionality that does not result in the input buffer being -flushed before the `Get_Immediate` call. A special unit -`Interfaces.Vxworks.IO` is provided that contains routines to enable +flushed before the ``Get_Immediate`` call. A special unit +``Interfaces.Vxworks.IO`` is provided that contains routines to enable this functionality. .. index:: Export -RM B.1(39-41): Pragma `Export` -============================== +RM B.1(39-41): Pragma ``Export`` +================================ - "If an implementation supports pragma `Export` to a given language, + "If an implementation supports pragma ``Export`` to a given language, then it should also allow the main subprogram to be written in that language. It should support some mechanism for invoking the elaboration of the Ada library units included in the system, and for invoking the finalization of the environment task. On typical systems, the recommended mechanism is to provide two subprograms whose link names are - `adainit` and `adafinal`. `adainit` should contain the - elaboration code for library units. `adafinal` should contain the + ``adainit`` and ``adafinal``. ``adainit`` should contain the + elaboration code for library units. ``adafinal`` should contain the finalization code. These subprograms should have no effect the second and subsequent time they are called." Followed. "Automatic elaboration of pre-elaborated packages should be - provided when pragma `Export` is supported." + provided when pragma ``Export`` is supported." Followed when the main program is in Ada. If the main program is in a foreign language, then -`adainit` must be called to elaborate pre-elaborated +``adainit`` must be called to elaborate pre-elaborated packages. - "For each supported convention `L` other than `Intrinsic`, an - implementation should support `Import` and `Export` pragmas - for objects of `L`-compatible types and for subprograms, and pragma - `Convention` for `L`-eligible types and for subprograms, + "For each supported convention *L* other than ``Intrinsic``, an + implementation should support ``Import`` and ``Export`` pragmas + for objects of *L*\ -compatible types and for subprograms, and pragma + `Convention` for *L*\ -eligible types and for subprograms, presuming the other language has corresponding features. Pragma - `Convention` need not be supported for scalar types." + ``Convention`` need not be supported for scalar types." Followed. @@ -861,8 +861,8 @@ Followed. .. index:: Interfaces -RM B.2(12-13): Package `Interfaces` -=================================== +RM B.2(12-13): Package ``Interfaces`` +===================================== "For each implementation-defined convention identifier, there should be a child package of package Interfaces with the corresponding name. This @@ -870,7 +870,7 @@ RM B.2(12-13): Package `Interfaces` interfacing to the language (implementation) represented by the convention. Any declarations useful for interfacing to any language on the given hardware architecture should be provided directly in - `Interfaces`." + ``Interfaces``." Followed. @@ -898,37 +898,37 @@ Followed. Followed. - "An Ada `in` scalar parameter is passed as a scalar argument to a C + "An Ada ``in`` scalar parameter is passed as a scalar argument to a C function." Followed. - "An Ada `in` parameter of an access-to-object type with designated - type `T` is passed as a ``t*`` argument to a C function, - where ``t`` is the C type corresponding to the Ada type `T`." + "An Ada ``in`` parameter of an access-to-object type with designated + type ``T`` is passed as a ``t*`` argument to a C function, + where ``t`` is the C type corresponding to the Ada type ``T``." Followed. - "An Ada access `T` parameter, or an Ada `out` or `in out` - parameter of an elementary type `T`, is passed as a ``t*`` + "An Ada access ``T`` parameter, or an Ada ``out`` or ``in out`` + parameter of an elementary type ``T``, is passed as a ``t*`` argument to a C function, where ``t`` is the C type corresponding to - the Ada type `T`. In the case of an elementary `out` or - `in out` parameter, a pointer to a temporary copy is used to + the Ada type ``T``. In the case of an elementary ``out`` or + ``in out`` parameter, a pointer to a temporary copy is used to preserve by-copy semantics." Followed. - "An Ada parameter of a record type `T`, of any mode, is passed as a + "An Ada parameter of a record type ``T``, of any mode, is passed as a ``t*`` argument to a C function, where ``t`` is the C - structure corresponding to the Ada type `T`." + structure corresponding to the Ada type ``T``." Followed. This convention may be overridden by the use of the C_Pass_By_Copy pragma, or Convention, or by explicitly specifying the mechanism for a given call using an extended import or export pragma. - "An Ada parameter of an array type with component type `T`, of any + "An Ada parameter of an array type with component type ``T``, of any mode, is passed as a ``t*`` argument to a C function, where - ``t`` is the C type corresponding to the Ada type `T`." + ``t`` is the C type corresponding to the Ada type ``T``." Followed. @@ -948,8 +948,8 @@ RM B.4(95-98): Interfacing with COBOL Followed. - "An Ada access `T` parameter is passed as a ``BY REFERENCE`` data item of - the COBOL type corresponding to `T`." + "An Ada access ``T`` parameter is passed as a ``BY REFERENCE`` data item of + the COBOL type corresponding to ``T``." Followed. @@ -982,9 +982,9 @@ Followed. Followed. - "An Ada parameter of an elementary, array, or record type `T` is - passed as a `T` argument to a Fortran procedure, where `T` is - the Fortran type corresponding to the Ada type `T`, and where the + "An Ada parameter of an elementary, array, or record type ``T`` is + passed as a ``T`` argument to a Fortran procedure, where ``T`` is + the Fortran type corresponding to the Ada type ``T``, and where the INTENT attribute of the corresponding dummy argument matches the Ada formal parameter mode; the Fortran implementation's parameter passing conventions are used. For elementary types, a local copy is used if @@ -1011,7 +1011,7 @@ Followed. "The interfacing pragmas (see Annex B) should support interface to assembler; the default assembler should be associated with the - convention identifier `Assembler`." + convention identifier ``Assembler``." Followed. @@ -1065,7 +1065,7 @@ Followed on any target supporting such operations. RM C.3(28): Interrupt Support ============================= - "If the `Ceiling_Locking` policy is not in effect, the + "If the ``Ceiling_Locking`` policy is not in effect, the implementation should provide means for the application to specify which interrupts are to be blocked during protected actions, if the underlying system allows for a finer-grain control of interrupt blocking." @@ -1089,17 +1089,17 @@ such direct calls. Followed. Compile time warnings are given when possible. -.. index:: Package `Interrupts` +.. index:: Package ``Interrupts`` .. index:: Interrupts -RM C.3.2(25): Package `Interrupts` -================================== +RM C.3.2(25): Package ``Interrupts`` +==================================== "If implementation-defined forms of interrupt handler procedures are supported, such as protected procedures with parameters, then for each - such form of a handler, a type analogous to `Parameterless_Handler` - should be specified in a child package of `Interrupts`, with the + such form of a handler, a type analogous to ``Parameterless_Handler`` + should be specified in a child package of ``Interrupts``, with the same operations as in the predefined package Interrupts." Followed. @@ -1117,8 +1117,8 @@ RM C.4(14): Pre-elaboration Requirements Followed. Executable code is generated in some cases, e.g., loops to initialize large arrays. -RM C.5(8): Pragma `Discard_Names` -================================= +RM C.5(8): Pragma ``Discard_Names`` +=================================== "If the pragma applies to an entity, then the implementation should reduce the amount of storage used for storing names associated with that @@ -1138,9 +1138,9 @@ RM C.7.2(30): The Package Task_Attributes recommended that the storage for task attributes will be pre-allocated statically and not from the heap. This can be accomplished by either placing restrictions on the number and the size of the task's - attributes, or by using the pre-allocated storage for the first `N` + attributes, or by using the pre-allocated storage for the first ``N`` attribute objects, and the heap for the others. In the latter case, - `N` should be documented." + ``N`` should be documented." Not followed. This implementation is not targeted to such a domain. @@ -1153,8 +1153,8 @@ RM D.3(17): Locking Policies locking policies defined by the implementation." Followed. Two implementation-defined locking policies are defined, -whose names (`Inheritance_Locking` and -`Concurrent_Readers_Locking`) follow this suggestion. +whose names (``Inheritance_Locking`` and +``Concurrent_Readers_Locking``) follow this suggestion. .. index:: Entry queuing policies @@ -1171,10 +1171,10 @@ Followed. No such implementation-defined queuing policies exist. RM D.6(9-10): Preemptive Abort ============================== - "Even though the `abort_statement` is included in the list of + "Even though the *abort_statement* is included in the list of potentially blocking operations (see 9.5.1), it is recommended that this statement be implemented in a way that never requires the task executing - the `abort_statement` to block." + the *abort_statement* to block." Followed. @@ -1194,8 +1194,8 @@ RM D.7(21): Tasking Restrictions GNAT currently takes advantage of these restrictions by providing an optimized run time when the Ravenscar profile and the GNAT restricted run time set -of restrictions are specified. See pragma `Profile (Ravenscar)` and -pragma `Profile (Restricted)` for more details. +of restrictions are specified. See pragma ``Profile (Ravenscar)`` and +pragma ``Profile (Restricted)`` for more details. .. index:: Time, monotonic @@ -1203,12 +1203,12 @@ RM D.8(47-49): Monotonic Time ============================= "When appropriate, implementations should provide configuration - mechanisms to change the value of `Tick`." + mechanisms to change the value of ``Tick``." Such configuration mechanisms are not appropriate to this implementation and are thus not supported. - "It is recommended that `Calendar.Clock` and `Real_Time.Clock` + "It is recommended that ``Calendar.Clock`` and ``Real_Time.Clock`` be implemented as transformations of the same time base." Followed. @@ -1216,7 +1216,7 @@ Followed. "It is recommended that the best time base which exists in the underlying system be available to the application through - `Clock`. `Best` may mean highest accuracy or largest range." + ``Clock``. `Best` may mean highest accuracy or largest range." Followed. @@ -1235,9 +1235,9 @@ RM E.5(28-29): Partition Communication Subsystem Followed by GLADE, a separately supplied PCS that can be used with GNAT. - "The `Write` operation on a stream of type `Params_Stream_Type` - should raise `Storage_Error` if it runs out of space trying to - write the `Item` into the stream." + "The ``Write`` operation on a stream of type ``Params_Stream_Type`` + should raise ``Storage_Error`` if it runs out of space trying to + write the ``Item`` into the stream." Followed by GLADE, a separately supplied PCS that can be used with GNAT. @@ -1249,9 +1249,9 @@ RM F(7): COBOL Support "If COBOL (respectively, C) is widely supported in the target environment, implementations supporting the Information Systems Annex - should provide the child package `Interfaces.COBOL` (respectively, - `Interfaces.C`) specified in Annex B and should support a - `convention_identifier` of COBOL (respectively, C) in the interfacing + should provide the child package ``Interfaces.COBOL`` (respectively, + ``Interfaces.C``) specified in Annex B and should support a + ``convention_identifier`` of COBOL (respectively, C) in the interfacing pragmas (see Annex B), thus allowing Ada programs to interface with programs written in that language." @@ -1263,9 +1263,9 @@ RM F.1(2): Decimal Radix Support ================================ "Packed decimal should be used as the internal representation for objects - of subtype `S` when `S`'Machine_Radix = 10." + of subtype ``S`` when ``S``'Machine_Radix = 10." -Not followed. GNAT ignores `S`'Machine_Radix and always uses binary +Not followed. GNAT ignores ``S``'Machine_Radix and always uses binary representations. .. index:: Numerics @@ -1275,9 +1275,9 @@ RM G: Numerics "If Fortran (respectively, C) is widely supported in the target environment, implementations supporting the Numerics Annex - should provide the child package `Interfaces.Fortran` (respectively, - `Interfaces.C`) specified in Annex B and should support a - `convention_identifier` of Fortran (respectively, C) in the interfacing + should provide the child package ``Interfaces.Fortran`` (respectively, + ``Interfaces.C``) specified in Annex B and should support a + ``convention_identifier`` of Fortran (respectively, C) in the interfacing pragmas (see Annex B), thus allowing Ada programs to interface with programs written in that language." @@ -1308,8 +1308,8 @@ Not followed. complex operand and a real operand is that the imaginary operand remains unchanged, an implementation should not perform this operation by first promoting the real operand to complex type and then performing a full - complex addition. In implementations in which the `Signed_Zeros` - attribute of the component type is `True` (and which therefore + complex addition. In implementations in which the ``Signed_Zeros`` + attribute of the component type is ``True`` (and which therefore conform to IEC 559:1989 in regard to the handling of the sign of zero in predefined arithmetic operations), the latter technique will not generate the required result when the imaginary component of the complex @@ -1321,15 +1321,15 @@ Not followed. Not followed. - "Implementations in which `Real'Signed_Zeros` is `True` should + "Implementations in which ``Real'Signed_Zeros`` is ``True`` should attempt to provide a rational treatment of the signs of zero results and - result components. As one example, the result of the `Argument` + result components. As one example, the result of the ``Argument`` function should have the sign of the imaginary component of the - parameter `X` when the point represented by that parameter lies on + parameter ``X`` when the point represented by that parameter lies on the positive real axis; as another, the sign of the imaginary component - of the `Compose_From_Polar` function should be the same as - (respectively, the opposite of) that of the `Argument` parameter when that - parameter has a value of zero and the `Modulus` parameter has a + of the ``Compose_From_Polar`` function should be the same as + (respectively, the opposite of) that of the ``Argument`` parameter when that + parameter has a value of zero and the ``Modulus`` parameter has a nonnegative (respectively, negative) value." Followed. @@ -1339,8 +1339,8 @@ Followed. RM G.1.2(49): Complex Elementary Functions ========================================== - "Implementations in which `Complex_Types.Real'Signed_Zeros` is - `True` should attempt to provide a rational treatment of the signs + "Implementations in which ``Complex_Types.Real'Signed_Zeros`` is + ``True`` should attempt to provide a rational treatment of the signs of zero results and result components. For example, many of the complex elementary functions have components that are odd functions of one of the parameter components; in these cases, the result component should @@ -1357,13 +1357,13 @@ RM G.2.4(19): Accuracy Requirements =================================== "The versions of the forward trigonometric functions without a - `Cycle` parameter should not be implemented by calling the - corresponding version with a `Cycle` parameter of - `2.0*Numerics.Pi`, since this will not provide the required + ``Cycle`` parameter should not be implemented by calling the + corresponding version with a ``Cycle`` parameter of + ``2.0*Numerics.Pi``, since this will not provide the required accuracy in some portions of the domain. For the same reason, the - version of `Log` without a `Base` parameter should not be - implemented by calling the corresponding version with a `Base` - parameter of `Numerics.e`." + version of ``Log`` without a ``Base`` parameter should not be + implemented by calling the corresponding version with a ``Base`` + parameter of ``Numerics.e``." Followed. @@ -1374,10 +1374,10 @@ Followed. RM G.2.6(15): Complex Arithmetic Accuracy ========================================= - "The version of the `Compose_From_Polar` function without a - `Cycle` parameter should not be implemented by calling the - corresponding version with a `Cycle` parameter of - `2.0*Numerics.Pi`, since this will not provide the required + "The version of the ``Compose_From_Polar`` function without a + ``Cycle`` parameter should not be implemented by calling the + corresponding version with a ``Cycle`` parameter of + ``2.0*Numerics.Pi``, since this will not provide the required accuracy in some portions of the domain." Followed. @@ -1387,7 +1387,7 @@ Followed. RM H.6(15/2): Pragma Partition_Elaboration_Policy ================================================= - "If the partition elaboration policy is `Sequential` and the + "If the partition elaboration policy is ``Sequential`` and the Environment task becomes permanently blocked during elaboration then the partition is deadlocked and it is recommended that the partition be immediately terminated." diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst index 0fd528d..be7338f 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_aspects.rst @@ -78,15 +78,15 @@ corresponding to :ref:`pragma Annotate<Pragma-Annotate>`. *Annotate => ID* - Equivalent to `pragma Annotate (ID, Entity => Name);` + Equivalent to ``pragma Annotate (ID, Entity => Name);`` *Annotate => (ID)* - Equivalent to `pragma Annotate (ID, Entity => Name);` + Equivalent to ``pragma Annotate (ID, Entity => Name);`` *Annotate => (ID ,ID {, ARG})* - Equivalent to `pragma Annotate (ID, ID {, ARG}, Entity => Name);` + Equivalent to ``pragma Annotate (ID, ID {, ARG}, Entity => Name);`` Aspect Async_Readers ==================== @@ -130,7 +130,7 @@ Aspect Dimension ================ .. index:: Dimension -The `Dimension` aspect is used to specify the dimensions of a given +The ``Dimension`` aspect is used to specify the dimensions of a given subtype of a dimensioned numeric type. The aspect also specifies a symbol used when doing formatted output of dimensioned quantities. The syntax is:: @@ -148,13 +148,13 @@ used when doing formatted output of dimensioned quantities. The syntax is:: This aspect can only be applied to a subtype whose parent type has -a `Dimension_System` aspect. The aspect must specify values for +a ``Dimension_System`` aspect. The aspect must specify values for all dimensions of the system. The rational values are the powers of the corresponding dimensions that are used by the compiler to verify that physical (numeric) computations are dimensionally consistent. For example, the computation of a force must result in dimensions (L => 1, M => 1, T => -2). For further examples of the usage -of this aspect, see package `System.Dim.Mks`. +of this aspect, see package ``System.Dim.Mks``. Note that when the dimensioned type is an integer type, then any dimension value must be an integer literal. @@ -162,9 +162,9 @@ Aspect Dimension_System ======================= .. index:: Dimension_System -The `Dimension_System` aspect is used to define a system of +The ``Dimension_System`` aspect is used to define a system of dimensions that will be used in subsequent subtype declarations with -`Dimension` aspects that reference this system. The syntax is:: +``Dimension`` aspects that reference this system. The syntax is:: with Dimension_System => (DIMENSION {, DIMENSION}); @@ -177,20 +177,20 @@ dimensions that will be used in subsequent subtype declarations with This aspect is applied to a type, which must be a numeric derived type (typically a floating-point type), that -will represent values within the dimension system. Each `DIMENSION` +will represent values within the dimension system. Each ``DIMENSION`` corresponds to one particular dimension. A maximum of 7 dimensions may -be specified. `Unit_Name` is the name of the dimension (for example -`Meter`). `Unit_Symbol` is the shorthand used for quantities -of this dimension (for example `m` for `Meter`). -`Dim_Symbol` gives +be specified. ``Unit_Name`` is the name of the dimension (for example +``Meter``). ``Unit_Symbol`` is the shorthand used for quantities +of this dimension (for example ``m`` for ``Meter``). +``Dim_Symbol`` gives the identification within the dimension system (typically this is a -single letter, e.g. `L` standing for length for unit name `Meter`). -The `Unit_Symbol` is used in formatted output of dimensioned quantities. -The `Dim_Symbol` is used in error messages when numeric operations have +single letter, e.g. ``L`` standing for length for unit name ``Meter``). +The ``Unit_Symbol`` is used in formatted output of dimensioned quantities. +The ``Dim_Symbol`` is used in error messages when numeric operations have inconsistent dimensions. GNAT provides the standard definition of the International MKS system in -the run-time package `System.Dim.Mks`. You can easily define +the run-time package ``System.Dim.Mks``. You can easily define similar packages for cgs units or British units, and define conversion factors between values in different systems. The MKS system is characterized by the following aspect: @@ -208,7 +208,7 @@ following aspect: (Unit_Name => Candela, Unit_Symbol => "cd", Dim_Symbol => 'J')); -Note that in the above type definition, we use the `at` symbol (``@``) to +Note that in the above type definition, we use the ``at`` symbol (``@``) to represent a theta character (avoiding the use of extended Latin-1 characters in this context). @@ -219,9 +219,9 @@ Aspect Disable_Controlled ========================= .. index:: Disable_Controlled -The aspect `Disable_Controlled` is defined for controlled record types. If -active, this aspect causes suppression of all related calls to `Initialize`, -`Adjust`, and `Finalize`. The intended use is for conditional compilation, +The aspect ``Disable_Controlled`` is defined for controlled record types. If +active, this aspect causes suppression of all related calls to ``Initialize``, +``Adjust``, and ``Finalize``. The intended use is for conditional compilation, where for example you might want a record to be controlled or not depending on whether some run-time check is enabled or suppressed. @@ -284,16 +284,16 @@ Aspect Invariant .. index:: Invariant This aspect is equivalent to :ref:`pragma Invariant<Pragma-Invariant>`. It is a -synonym for the language defined aspect `Type_Invariant` except -that it is separately controllable using pragma `Assertion_Policy`. +synonym for the language defined aspect ``Type_Invariant`` except +that it is separately controllable using pragma ``Assertion_Policy``. Aspect Invariant'Class ====================== .. index:: Invariant'Class This aspect is equivalent to :ref:`pragma Type_Invariant_Class<Pragma-Type_Invariant_Class>`. It is a -synonym for the language defined aspect `Type_Invariant'Class` except -that it is separately controllable using pragma `Assertion_Policy`. +synonym for the language defined aspect ``Type_Invariant'Class`` except +that it is separately controllable using pragma ``Assertion_Policy``. Aspect Iterable =============== @@ -302,10 +302,10 @@ Aspect Iterable This aspect provides a light-weight mechanism for loops and quantified expressions over container types, without the overhead imposed by the tampering checks of standard Ada 2012 iterators. The value of the aspect is an aggregate -with four named components: `First`, `Next`, `Has_Element`, and `Element` (the +with four named components: ``First``, ``Next``, ``Has_Element``, and ``Element`` (the last one being optional). When only 3 components are specified, only the -`for .. in` form of iteration over cursors is available. When all 4 components -are specified, both this form and the `for .. of` form of iteration over +``for .. in`` form of iteration over cursors is available. When all 4 components +are specified, both this form and the ``for .. of`` form of iteration over elements are available. The following is a typical example of use: .. code-block:: ada @@ -316,30 +316,30 @@ elements are available. The following is a typical example of use: Has_Element => Cursor_Has_Element, [Element => Get_Element]); -* The value denoted by `First` must denote a primitive operation of the - container type that returns a `Cursor`, which must a be a type declared in +* The value denoted by ``First`` must denote a primitive operation of the + container type that returns a ``Cursor``, which must a be a type declared in the container package or visible from it. For example: .. code-block:: ada function First_Cursor (Cont : Container) return Cursor; -* The value of `Next` is a primitive operation of the container type that takes +* The value of ``Next`` is a primitive operation of the container type that takes both a container and a cursor and yields a cursor. For example: .. code-block:: ada function Advance (Cont : Container; Position : Cursor) return Cursor; -* The value of `Has_Element` is a primitive operation of the container type +* The value of ``Has_Element`` is a primitive operation of the container type that takes both a container and a cursor and yields a boolean. For example: .. code-block:: ada function Cursor_Has_Element (Cont : Container; Position : Cursor) return Boolean; -* The value of `Element` is a primitive operation of the container type that - takes both a container and a cursor and yields an `Element_Type`, which must +* The value of ``Element`` is a primitive operation of the container type that + takes both a container and a cursor and yields an ``Element_Type``, which must be a type declared in the container package or visible from it. For example: .. code-block:: ada @@ -373,6 +373,12 @@ Aspect No_Elaboration_Code_All This aspect is equivalent to :ref:`pragma No_Elaboration_Code_All<Pragma-No_Elaboration_Code_All>` for a program unit. +Aspect No_Inline +================ +.. index:: No_Inline + +This boolean aspect is equivalent to :ref:`pragma No_Inline<Pragma-No_Inline>`. + Aspect No_Tagged_Streams ======================== .. index:: No_Tagged_Streams @@ -412,11 +418,11 @@ Aspect Predicate .. index:: Predicate This aspect is equivalent to :ref:`pragma Predicate<Pragma-Predicate>`. It is thus -similar to the language defined aspects `Dynamic_Predicate` -and `Static_Predicate` except that whether the resulting +similar to the language defined aspects ``Dynamic_Predicate`` +and ``Static_Predicate`` except that whether the resulting predicate is static or dynamic is controlled by the form of the expression. It is also separately controllable using pragma -`Assertion_Policy`. +``Assertion_Policy``. Aspect Pure_Function ==================== @@ -473,7 +479,7 @@ Aspect Shared .. index:: Shared This boolean aspect is equivalent to :ref:`pragma Shared<Pragma-Shared>` -and is thus a synonym for aspect `Atomic`. +and is thus a synonym for aspect ``Atomic``. Aspect Simple_Storage_Pool ========================== @@ -574,5 +580,5 @@ Aspect Warnings .. index:: Warnings This aspect is equivalent to the two argument form of :ref:`pragma Warnings<Pragma_Warnings>`, -where the first argument is `ON` or `OFF` and the second argument +where the first argument is ``ON`` or ``OFF`` and the second argument is the entity. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst index 38731f3..6f03223 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_attributes.rst @@ -27,7 +27,7 @@ Attribute Abort_Signal ====================== .. index:: Abort_Signal -`Standard'Abort_Signal` (`Standard` is the only allowed +``Standard'Abort_Signal`` (``Standard`` is the only allowed prefix) provides the entity for the special exception used to signal task abort or asynchronous transfer of control. Normally this attribute should only be used in the tasking runtime (it is highly peculiar, and @@ -36,13 +36,13 @@ intercept the abort exception). Attribute Address_Size ====================== -.. index:: Size of `Address` +.. index:: Size of ``Address`` .. index:: Address_Size -`Standard'Address_Size` (`Standard` is the only allowed +``Standard'Address_Size`` (``Standard`` is the only allowed prefix) is a static constant giving the number of bits in an -`Address`. It is the same value as System.Address'Size, +``Address``. It is the same value as System.Address'Size, but has the advantage of being static, while a direct reference to System.Address'Size is nonstatic because Address is a private type. @@ -51,7 +51,7 @@ Attribute Asm_Input =================== .. index:: Asm_Input -The `Asm_Input` attribute denotes a function that takes two +The ``Asm_Input`` attribute denotes a function that takes two parameters. The first is a string, the second is an expression of the type designated by the prefix. The first (string) argument is required to be a static expression, and is the constraint for the parameter, @@ -65,7 +65,7 @@ Attribute Asm_Output ==================== .. index:: Asm_Output -The `Asm_Output` attribute denotes a function that takes two +The ``Asm_Output`` attribute denotes a function that takes two parameters. The first is a string, the second is the name of a variable of the type designated by the attribute prefix. The first (string) argument is required to be a static expression and designates the @@ -74,14 +74,14 @@ required). The second argument is the variable to be updated with the result. The possible values for constraint are the same as those used in the RTL, and are dependent on the configuration file used to build the GCC back end. If there are no output operands, then this argument may -either be omitted, or explicitly given as `No_Output_Operands`. +either be omitted, or explicitly given as ``No_Output_Operands``. :ref:`Machine_Code_Insertions` Attribute Atomic_Always_Lock_Free ================================= .. index:: Atomic_Always_Lock_Free -The prefix of the `Atomic_Always_Lock_Free` attribute is a type. +The prefix of the ``Atomic_Always_Lock_Free`` attribute is a type. The result is a Boolean value which is True if the type has discriminants, and False otherwise. The result indicate whether atomic operations are supported by the target for the given type. @@ -90,11 +90,11 @@ Attribute Bit ============= .. index:: Bit -``obj'Bit``, where `obj` is any object, yields the bit +``obj'Bit``, where ``obj`` is any object, yields the bit offset within the storage unit (byte) that contains the first bit of storage allocated for the object. The value of this attribute is of the -type `Universal_Integer`, and is always a non-negative number not -exceeding the value of `System.Storage_Unit`. +type *universal_integer*, and is always a non-negative number not +exceeding the value of ``System.Storage_Unit``. For an object that is a variable or a constant allocated in a register, the value is zero. (The use of this attribute does not force the @@ -105,26 +105,26 @@ to either the matching actual parameter or to a copy of the matching actual parameter. For an access object the value is zero. Note that -``obj.all'Bit`` is subject to an `Access_Check` for the +``obj.all'Bit`` is subject to an ``Access_Check`` for the designated object. Similarly for a record component ``X.C'Bit`` is subject to a discriminant check and ``X(I).Bit`` and ``X(I1..I2)'Bit`` are subject to index checks. This attribute is designed to be compatible with the DEC Ada 83 definition -and implementation of the `Bit` attribute. +and implementation of the ``Bit`` attribute. Attribute Bit_Position ====================== .. index:: Bit_Position -``R.C'Bit_Position``, where `R` is a record object and `C` is one +``R.C'Bit_Position``, where ``R`` is a record object and ``C`` is one of the fields of the record type, yields the bit offset within the record contains the first bit of storage allocated for the object. The value of this attribute is of the -type `Universal_Integer`. The value depends only on the field -`C` and is independent of the alignment of -the containing record `R`. +type *universal_integer*. The value depends only on the field +``C`` and is independent of the alignment of +the containing record ``R``. Attribute Code_Address ====================== @@ -133,7 +133,7 @@ Attribute Code_Address .. index:: Address of subprogram code -The `'Address` +The ``'Address`` attribute may be applied to subprograms in Ada 95 and Ada 2005, but the intended effect seems to be to provide an address value which can be used to call the subprogram by means of @@ -148,29 +148,29 @@ an address clause as in the following example: pragma Import (Ada, L); -A call to `L` is then expected to result in a call to `K`. +A call to ``L`` is then expected to result in a call to ``K``. In Ada 83, where there were no access-to-subprogram values, this was a common work-around for getting the effect of an indirect call. -GNAT implements the above use of `Address` and the technique +GNAT implements the above use of ``Address`` and the technique illustrated by the example code works correctly. However, for some purposes, it is useful to have the address of the start of the generated code for the subprogram. On some architectures, this is -not necessarily the same as the `Address` value described above. -For example, the `Address` value may reference a subprogram +not necessarily the same as the ``Address`` value described above. +For example, the ``Address`` value may reference a subprogram descriptor rather than the subprogram itself. -The `'Code_Address` attribute, which can only be applied to +The ``'Code_Address`` attribute, which can only be applied to subprogram entities, always returns the address of the start of the generated code of the specified subprogram, which may or may not be -the same value as is returned by the corresponding `'Address` +the same value as is returned by the corresponding ``'Address`` attribute. Attribute Compiler_Version ========================== .. index:: Compiler_Version -`Standard'Compiler_Version` (`Standard` is the only allowed +``Standard'Compiler_Version`` (``Standard`` is the only allowed prefix) yields a static string identifying the version of the compiler being used to compile the unit containing the attribute reference. @@ -178,12 +178,12 @@ Attribute Constrained ===================== .. index:: Constrained -In addition to the usage of this attribute in the Ada RM, `GNAT` -also permits the use of the `'Constrained` attribute +In addition to the usage of this attribute in the Ada RM, GNAT +also permits the use of the ``'Constrained`` attribute in a generic template for any type, including types without discriminants. The value of this attribute in the generic instance when applied to a scalar type or a -record type without discriminants is always `True`. This usage is +record type without discriminants is always ``True``. This usage is compatible with older Ada compilers, including notably DEC Ada. @@ -195,11 +195,11 @@ Attribute Default_Bit_Order .. index:: Default_Bit_Order -`Standard'Default_Bit_Order` (`Standard` is the only -permissible prefix), provides the value `System.Default_Bit_Order` -as a `Pos` value (0 for `High_Order_First`, 1 for -`Low_Order_First`). This is used to construct the definition of -`Default_Bit_Order` in package `System`. +``Standard'Default_Bit_Order`` (``Standard`` is the only +permissible prefix), provides the value ``System.Default_Bit_Order`` +as a ``Pos`` value (0 for ``High_Order_First``, 1 for +``Low_Order_First``). This is used to construct the definition of +``Default_Bit_Order`` in package ``System``. Attribute Default_Scalar_Storage_Order ====================================== @@ -209,19 +209,19 @@ Attribute Default_Scalar_Storage_Order .. index:: Default_Scalar_Storage_Order -`Standard'Default_Scalar_Storage_Order` (`Standard` is the only +``Standard'Default_Scalar_Storage_Order`` (``Standard`` is the only permissible prefix), provides the current value of the default scalar storage -order (as specified using pragma `Default_Scalar_Storage_Order`, or -equal to `Default_Bit_Order` if unspecified) as a -`System.Bit_Order` value. This is a static attribute. +order (as specified using pragma ``Default_Scalar_Storage_Order``, or +equal to ``Default_Bit_Order`` if unspecified) as a +``System.Bit_Order`` value. This is a static attribute. Attribute Deref =============== .. index:: Deref -The attribute `typ'Deref(expr)` where `expr` is of type `System.Address` yields -the variable of type `typ` that is located at the given address. It is similar -to `(totyp (expr).all)`, where `totyp` is an unchecked conversion from address to +The attribute ``typ'Deref(expr)`` where ``expr`` is of type ``System.Address`` yields +the variable of type ``typ`` that is located at the given address. It is similar +to ``(totyp (expr).all)``, where ``totyp`` is an unchecked conversion from address to a named access-to-`typ` type, except that it yields a variable, so it can be used on the left side of an assignment. @@ -233,7 +233,7 @@ Attribute Descriptor_Size .. index:: Descriptor_Size -Nonstatic attribute `Descriptor_Size` returns the size in bits of the +Nonstatic attribute ``Descriptor_Size`` returns the size in bits of the descriptor allocated for a type. The result is non-zero only for unconstrained array types and the returned value is of type universal integer. In GNAT, an array descriptor contains bounds information and is located immediately before @@ -247,14 +247,14 @@ the first element of the array. The attribute takes into account any additional padding due to type alignment. In the example above, the descriptor contains two values of type -`Positive` representing the low and high bound. Since `Positive` has -a size of 31 bits and an alignment of 4, the descriptor size is `2 * Positive'Size + 2` or 64 bits. +``Positive`` representing the low and high bound. Since ``Positive`` has +a size of 31 bits and an alignment of 4, the descriptor size is ``2 * Positive'Size + 2`` or 64 bits. Attribute Elaborated ==================== .. index:: Elaborated -The prefix of the `'Elaborated` attribute must be a unit name. The +The prefix of the ``'Elaborated`` attribute must be a unit name. The value is a Boolean which indicates whether or not the given unit has been elaborated. This attribute is primarily intended for internal use by the generated code for dynamic elaboration checking, but it can also be used @@ -305,7 +305,7 @@ Attribute Emax .. index:: Emax -The `Emax` attribute is provided for compatibility with Ada 83. See +The ``Emax`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -313,21 +313,21 @@ Attribute Enabled ================= .. index:: Enabled -The `Enabled` attribute allows an application program to check at compile +The ``Enabled`` attribute allows an application program to check at compile time to see if the designated check is currently enabled. The prefix is a simple identifier, referencing any predefined check name (other than -`All_Checks`) or a check name introduced by pragma Check_Name. If +``All_Checks``) or a check name introduced by pragma Check_Name. If no argument is given for the attribute, the check is for the general state of the check, if an argument is given, then it is an entity name, and the -check indicates whether an `Suppress` or `Unsuppress` has been +check indicates whether an ``Suppress`` or ``Unsuppress`` has been given naming the entity (if not, then the argument is ignored). Note that instantiations inherit the check status at the point of the instantiation, so a useful idiom is to have a library package that -introduces a check name with `pragma Check_Name`, and then contains -generic packages or subprograms which use the `Enabled` attribute +introduces a check name with ``pragma Check_Name``, and then contains +generic packages or subprograms which use the ``Enabled`` attribute to see if the check is enabled. A user of this package can then issue -a `pragma Suppress` or `pragma Unsuppress` before instantiating +a ``pragma Suppress`` or ``pragma Unsuppress`` before instantiating the package or subprogram, controlling whether the check will be present. Attribute Enum_Rep @@ -336,7 +336,7 @@ Attribute Enum_Rep .. index:: Enum_Rep -For every enumeration subtype `S`, ``S'Enum_Rep`` denotes a +For every enumeration subtype ``S``, ``S'Enum_Rep`` denotes a function with the following spec: .. code-block:: ada @@ -344,26 +344,26 @@ function with the following spec: function S'Enum_Rep (Arg : S'Base) return <Universal_Integer>; -It is also allowable to apply `Enum_Rep` directly to an object of an +It is also allowable to apply ``Enum_Rep`` directly to an object of an enumeration type or to a non-overloaded enumeration literal. In this case ``S'Enum_Rep`` is equivalent to -``typ'Enum_Rep(S)`` where `typ` is the type of the +``typ'Enum_Rep(S)`` where ``typ`` is the type of the enumeration literal or object. The function returns the representation value for the given enumeration -value. This will be equal to value of the `Pos` attribute in the +value. This will be equal to value of the ``Pos`` attribute in the absence of an enumeration representation clause. This is a static attribute (i.e.,:the result is static if the argument is static). ``S'Enum_Rep`` can also be used with integer types and objects, in which case it simply returns the integer value. The reason for this -is to allow it to be used for `(<>)` discrete formal arguments in +is to allow it to be used for ``(<>)`` discrete formal arguments in a generic unit that can be instantiated with either enumeration types -or integer types. Note that if `Enum_Rep` is used on a modular +or integer types. Note that if ``Enum_Rep`` is used on a modular type whose upper bound exceeds the upper bound of the largest signed integer type, and the argument is a variable, so that the universal -integer calculation is done at run time, then the call to `Enum_Rep` -may raise `Constraint_Error`. +integer calculation is done at run time, then the call to ``Enum_Rep`` +may raise ``Constraint_Error``. Attribute Enum_Val ================== @@ -371,7 +371,7 @@ Attribute Enum_Val .. index:: Enum_Val -For every enumeration subtype `S`, ``S'Enum_Val`` denotes a +For every enumeration subtype ``S``, ``S'Enum_Val`` denotes a function with the following spec: .. code-block:: ada @@ -382,7 +382,7 @@ function with the following spec: The function returns the enumeration value whose representation matches the argument, or raises Constraint_Error if no enumeration literal of the type has the matching value. -This will be equal to value of the `Val` attribute in the +This will be equal to value of the ``Val`` attribute in the absence of an enumeration representation clause. This is a static attribute (i.e., the result is static if the argument is static). @@ -392,7 +392,7 @@ Attribute Epsilon .. index:: Epsilon -The `Epsilon` attribute is provided for compatibility with Ada 83. See +The ``Epsilon`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -400,20 +400,20 @@ Attribute Fast_Math =================== .. index:: Fast_Math -`Standard'Fast_Math` (`Standard` is the only allowed +``Standard'Fast_Math`` (``Standard`` is the only allowed prefix) yields a static Boolean value that is True if pragma -`Fast_Math` is active, and False otherwise. +``Fast_Math`` is active, and False otherwise. Attribute Finalization_Size =========================== .. index:: Finalization_Size -The prefix of attribute `Finalization_Size` must be an object or +The prefix of attribute ``Finalization_Size`` must be an object or a non-class-wide type. This attribute returns the size of any hidden data reserved by the compiler to handle finalization-related actions. The type of -the attribute is `universal_integer`. +the attribute is *universal_integer*. -`Finalization_Size` yields a value of zero for a type with no controlled +``Finalization_Size`` yields a value of zero for a type with no controlled parts, an object whose type has no controlled parts, or an object of a class-wide type whose tag denotes a type with no controlled parts. @@ -423,20 +423,20 @@ Attribute Fixed_Value ===================== .. index:: Fixed_Value -For every fixed-point type `S`, ``S'Fixed_Value`` denotes a +For every fixed-point type ``S``, ``S'Fixed_Value`` denotes a function with the following specification: .. code-block:: ada function S'Fixed_Value (Arg : <Universal_Integer>) return S; -The value returned is the fixed-point value `V` such that:: +The value returned is the fixed-point value ``V`` such that:: V = Arg * S'Small The effect is thus similar to first converting the argument to the -integer type used to represent `S`, and then doing an unchecked +integer type used to represent ``S``, and then doing an unchecked conversion to the fixed-point type. The difference is that there are full range checks, to ensure that the result is in range. This attribute is primarily intended for use in implementation of the @@ -455,7 +455,7 @@ Attribute Has_Access_Values .. index:: Has_Access_Values -The prefix of the `Has_Access_Values` attribute is a type. The result +The prefix of the ``Has_Access_Values`` attribute is a type. The result is a Boolean value which is True if the is an access type, or is a composite type with a component (at any nesting depth) that is an access type, and is False otherwise. @@ -469,7 +469,7 @@ Attribute Has_Discriminants .. index:: Has_Discriminants -The prefix of the `Has_Discriminants` attribute is a type. The result +The prefix of the ``Has_Discriminants`` attribute is a type. The result is a Boolean value which is True if the type has discriminants, and 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 @@ -479,9 +479,9 @@ Attribute Img ============= .. index:: Img -The `Img` attribute differs from `Image` in that it is applied +The ``Img`` attribute differs from ``Image`` in that it is applied directly to an object, and yields the same result as -`Image` for the subtype of the object. This is convenient for +``Image`` for the subtype of the object. This is convenient for debugging: .. code-block:: ada @@ -495,31 +495,31 @@ has the same meaning as the more verbose: Put_Line ("X = " & T'Image (X)); -where `T` is the (sub)type of the object `X`. +where ``T`` is the (sub)type of the object ``X``. -Note that technically, in analogy to `Image`, -`X'Img` returns a parameterless function +Note that technically, in analogy to ``Image``, +``X'Img`` returns a parameterless function that returns the appropriate string when called. This means that -`X'Img` can be renamed as a function-returning-string, or used +``X'Img`` can be renamed as a function-returning-string, or used in an instantiation as a function parameter. Attribute Integer_Value ======================= .. index:: Integer_Value -For every integer type `S`, ``S'Integer_Value`` denotes a +For every integer type ``S``, ``S'Integer_Value`` denotes a function with the following spec: .. code-block:: ada function S'Integer_Value (Arg : <Universal_Fixed>) return S; -The value returned is the integer value `V`, such that:: +The value returned is the integer value ``V``, such that:: Arg = V * T'Small -where `T` is the type of `Arg`. +where ``T`` is the type of ``Arg``. The effect is thus similar to first doing an unchecked conversion from the fixed-point type to its corresponding implementation type, and then converting the result to the target integer type. The difference is @@ -550,7 +550,7 @@ Attribute Large .. index:: Large -The `Large` attribute is provided for compatibility with Ada 83. See +The ``Large`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -558,7 +558,7 @@ Attribute Library_Level ======================= .. index:: Library_Level -`P'Library_Level`, where P is an entity name, +``P'Library_Level``, where P is an entity name, returns a Boolean value which is True if the entity is declared at the library level, and False otherwise. Note that within a generic instantition, the name of the generic unit denotes the @@ -582,8 +582,8 @@ Attribute Lock_Free =================== .. index:: Lock_Free -`P'Lock_Free`, where P is a protected object, returns True if a -pragma `Lock_Free` applies to P. +``P'Lock_Free``, where P is a protected object, returns True if a +pragma ``Lock_Free`` applies to P. Attribute Loop_Entry ==================== @@ -594,20 +594,20 @@ Syntax:: X'Loop_Entry [(loop_name)] -The `Loop_Entry` attribute is used to refer to the value that an +The ``Loop_Entry`` attribute is used to refer to the value that an expression had upon entry to a given loop in much the same way that the -`Old` attribute in a subprogram postcondition can be used to refer +``Old`` attribute in a subprogram postcondition can be used to refer to the value an expression had upon entry to the subprogram. The relevant loop is either identified by the given loop name, or it is the innermost enclosing loop when no loop name is given. -A `Loop_Entry` attribute can only occur within a -`Loop_Variant` or `Loop_Invariant` pragma. A common use of -`Loop_Entry` is to compare the current value of objects with their -initial value at loop entry, in a `Loop_Invariant` pragma. +A ``Loop_Entry`` attribute can only occur within a +``Loop_Variant`` or ``Loop_Invariant`` pragma. A common use of +``Loop_Entry`` is to compare the current value of objects with their +initial value at loop entry, in a ``Loop_Invariant`` pragma. -The effect of using `X'Loop_Entry` is the same as declaring -a constant initialized with the initial value of `X` at loop +The effect of using ``X'Loop_Entry`` is the same as declaring +a constant initialized with the initial value of ``X`` at loop entry. This copy is not performed if the loop is not entered, or if the corresponding pragmas are ignored or disabled. @@ -615,7 +615,7 @@ Attribute Machine_Size ====================== .. index:: Machine_Size -This attribute is identical to the `Object_Size` attribute. It is +This attribute is identical to the ``Object_Size`` attribute. It is provided for compatibility with the DEC Ada 83 attribute of this name. Attribute Mantissa @@ -624,7 +624,7 @@ Attribute Mantissa .. index:: Mantissa -The `Mantissa` attribute is provided for compatibility with Ada 83. See +The ``Mantissa`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -636,7 +636,7 @@ Attribute Maximum_Alignment .. index:: Maximum_Alignment -`Standard'Maximum_Alignment` (`Standard` is the only +``Standard'Maximum_Alignment`` (``Standard`` is the only permissible prefix) provides the maximum useful alignment value for the target. This is a static value that can be used to specify the alignment for an object, guaranteeing that it is properly aligned in all @@ -650,11 +650,11 @@ Attribute Mechanism_Code .. index:: Mechanism_Code -``function'Mechanism_Code`` yields an integer code for the -mechanism used for the result of function, and -``subprogram'Mechanism_Code (n)`` yields the mechanism -used for formal parameter number `n` (a static integer value with 1 -meaning the first parameter) of `subprogram`. The code returned is: +``func'Mechanism_Code`` yields an integer code for the +mechanism used for the result of function ``func``, and +``subprog'Mechanism_Code (n)`` yields the mechanism +used for formal parameter number *n* (a static integer value, with 1 +meaning the first parameter) of subprogram ``subprog``. The code returned is: @@ -671,7 +671,7 @@ Attribute Null_Parameter .. index:: Null_Parameter A reference ``T'Null_Parameter`` denotes an imaginary object of -type or subtype `T` allocated at machine address zero. The attribute +type or subtype ``T`` allocated at machine address zero. The attribute is allowed only as the default expression of a formal parameter, or as an actual expression of a subprogram call. In either case, the subprogram must be imported. @@ -682,7 +682,7 @@ default). This capability is needed to specify that a zero address should be passed for a record or other composite object passed by reference. -There is no way of indicating this without the `Null_Parameter` +There is no way of indicating this without the ``Null_Parameter`` attribute. .. _Attribute-Object_Size: @@ -696,8 +696,8 @@ Attribute Object_Size The size of an object is not necessarily the same as the size of the type of an object. This is because by default object sizes are increased to be a multiple of the alignment of the object. For example, -`Natural'Size` is -31, but by default objects of type `Natural` will have a size of 32 bits. +``Natural'Size`` is +31, but by default objects of type ``Natural`` will have a size of 32 bits. Similarly, a record containing an integer and a character: .. code-block:: ada @@ -708,7 +708,7 @@ Similarly, a record containing an integer and a character: end record; -will have a size of 40 (that is `Rec'Size` will be 40). The +will have a size of 40 (that is ``Rec'Size`` will be 40). The alignment will be 4, because of the integer field, and so the default size of record objects for this type will be 64 (8 bytes). @@ -720,7 +720,7 @@ an object size of 40 can be explicitly specified in this case. A consequence of this capability is that different object sizes can be given to subtypes that would otherwise be considered in Ada to be statically matching. But it makes no sense to consider such subtypes -as statically matching. Consequently, in `GNAT` we add a rule +as statically matching. Consequently, GNAT adds a rule to the static matching rules that requires object sizes to match. Consider this example: @@ -746,10 +746,10 @@ Consider this example: In the absence of lines 5 and 6, -types `R1` and `R2` statically match and +types ``R1`` and ``R2`` statically match and hence the conversion on line 12 is legal. But since lines 5 and 6 -cause the object sizes to differ, `GNAT` considers that types -`R1` and `R2` are not statically matching, and line 12 +cause the object sizes to differ, GNAT considers that types +``R1`` and ``R2`` are not statically matching, and line 12 generates the diagnostic shown above. Similar additional checks are performed in other contexts requiring @@ -759,13 +759,13 @@ Attribute Old ============= .. index:: Old -In addition to the usage of `Old` defined in the Ada 2012 RM (usage -within `Post` aspect), GNAT also permits the use of this attribute -in implementation defined pragmas `Postcondition`, -`Contract_Cases` and `Test_Case`. Also usages of -`Old` which would be illegal according to the Ada 2012 RM +In addition to the usage of ``Old`` defined in the Ada 2012 RM (usage +within ``Post`` aspect), GNAT also permits the use of this attribute +in implementation defined pragmas ``Postcondition``, +``Contract_Cases`` and ``Test_Case``. Also usages of +``Old`` which would be illegal according to the Ada 2012 RM definition are allowed under control of -implementation defined pragma `Unevaluated_Use_Of_Old`. +implementation defined pragma ``Unevaluated_Use_Of_Old``. Attribute Passed_By_Reference ============================= @@ -773,10 +773,10 @@ Attribute Passed_By_Reference .. index:: Passed_By_Reference -``type'Passed_By_Reference`` for any subtype `type` returns -a value of type `Boolean` value that is `True` if the type is -normally passed by reference and `False` if the type is normally -passed by copy in calls. For scalar types, the result is always `False` +``typ'Passed_By_Reference`` for any subtype `typ` returns +a value of type ``Boolean`` value that is ``True`` if the type is +normally passed by reference and ``False`` if the type is normally +passed by copy in calls. For scalar types, the result is always ``False`` and is static. For non-scalar types, the result is nonstatic. Attribute Pool_Address @@ -785,7 +785,7 @@ Attribute Pool_Address .. index:: Pool_Address -``X'Pool_Address`` for any object `X` returns the address +``X'Pool_Address`` for any object ``X`` returns the address of X within its storage pool. This is the same as ``X'Address``, except that for an unconstrained array whose bounds are allocated just before the first component, @@ -797,18 +797,18 @@ Here, we are interpreting 'storage pool' broadly to mean ``wherever the object is allocated``, which could be a user-defined storage pool, the global heap, on the stack, or in a static memory area. -For an object created by `new`, ``Ptr.all'Pool_Address`` is -what is passed to `Allocate` and returned from `Deallocate`. +For an object created by ``new``, ``Ptr.all'Pool_Address`` is +what is passed to ``Allocate`` and returned from ``Deallocate``. Attribute Range_Length ====================== .. index:: Range_Length -``type'Range_Length`` for any discrete type `type` yields +``typ'Range_Length`` for any discrete type `typ` yields the number of values represented by the subtype (zero for a null -range). The result is static for static subtypes. `Range_Length` +range). The result is static for static subtypes. ``Range_Length`` applied to the index subtype of a one dimensional array always gives the -same result as `Length` applied to the array itself. +same result as ``Length`` applied to the array itself. Attribute Restriction_Set ========================= @@ -832,7 +832,7 @@ There are two forms: In the case of the first form, the only restriction names allowed are parameterless restrictions that are checked for consistency at bind time. For a complete list see the -subtype `System.Rident.Partition_Boolean_Restrictions`. +subtype ``System.Rident.Partition_Boolean_Restrictions``. The result returned is True if the restriction is known to be in effect, and False if the restriction is known not to @@ -894,7 +894,7 @@ Attribute Safe_Emax .. index:: Safe_Emax -The `Safe_Emax` attribute is provided for compatibility with Ada 83. See +The ``Safe_Emax`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -904,7 +904,7 @@ Attribute Safe_Large .. index:: Safe_Large -The `Safe_Large` attribute is provided for compatibility with Ada 83. See +The ``Safe_Large`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -914,7 +914,7 @@ Attribute Safe_Small .. index:: Safe_Small -The `Safe_Small` attribute is provided for compatibility with Ada 83. See +The ``Safe_Small`` attribute is provided for compatibility with Ada 83. See the Ada 83 reference manual for an exact description of the semantics of this attribute. @@ -928,8 +928,8 @@ Attribute Scalar_Storage_Order .. index:: Scalar_Storage_Order -For every array or record type `S`, the representation attribute -`Scalar_Storage_Order` denotes the order in which storage elements +For every array or record type ``S``, the representation attribute +``Scalar_Storage_Order`` denotes the order in which storage elements that make up scalar components are ordered within S. The value given must be a static expression of type System.Bit_Order. The following is an example of the use of this feature: @@ -967,13 +967,13 @@ of the use of this feature: -- the former is used. -Other properties are as for standard representation attribute `Bit_Order`, -as defined by Ada RM 13.5.3(4). The default is `System.Default_Bit_Order`. +Other properties are as for standard representation attribute ``Bit_Order``, +as defined by Ada RM 13.5.3(4). The default is ``System.Default_Bit_Order``. -For a record type `T`, if ``T'Scalar_Storage_Order`` is +For a record type ``T``, if ``T'Scalar_Storage_Order`` is specified explicitly, it shall be equal to ``T'Bit_Order``. Note: -this means that if a `Scalar_Storage_Order` attribute definition -clause is not confirming, then the type's `Bit_Order` shall be +this means that if a ``Scalar_Storage_Order`` attribute definition +clause is not confirming, then the type's ``Bit_Order`` shall be specified explicitly and set to the same value. Derived types inherit an explicitly set scalar storage order from their parent @@ -981,18 +981,19 @@ types. This may be overridden for the derived type by giving an explicit scalar storage order for the derived type. For a record extension, the derived type must have the same scalar storage order as the parent type. -A component of a record or array type that is a bit-packed array, or that -does not start on a byte boundary, must have the same scalar storage order -as the enclosing record or array type. +A component of a record type that is itself a record or an array and that does +not start and end on a byte boundary must have have the same scalar storage +order as the record type. A component of a bit-packed array type that is itself +a record or an array must have the same scalar storage order as the array type. -No component of a type that has an explicit `Scalar_Storage_Order` +No component of a type that has an explicit ``Scalar_Storage_Order`` attribute definition may be aliased. -A confirming `Scalar_Storage_Order` attribute definition clause (i.e. -with a value equal to `System.Default_Bit_Order`) has no effect. +A confirming ``Scalar_Storage_Order`` attribute definition clause (i.e. +with a value equal to ``System.Default_Bit_Order``) has no effect. If the opposite storage order is specified, then whenever the value of -a scalar component of an object of type `S` is read, the storage +a scalar component of an object of type ``S`` is read, the storage elements of the enclosing machine scalar are first reversed (before retrieving the component value, possibly applying some shift and mask operatings on the enclosing machine scalar), and the opposite operation @@ -1002,23 +1003,23 @@ In that case, the restrictions set forth in 13.5.1(10.3/2) for scalar components are relaxed. Instead, the following rules apply: * the underlying storage elements are those at positions - `(position + first_bit / storage_element_size) .. (position + (last_bit + storage_element_size - 1) / storage_element_size)` + ``(position + first_bit / storage_element_size) .. (position + (last_bit + storage_element_size - 1) / storage_element_size)`` * the sequence of underlying storage elements shall have a size no greater than the largest machine scalar * the enclosing machine scalar is defined as the smallest machine scalar starting at a position no greater than - `position + first_bit / storage_element_size` and covering - storage elements at least up to `position + (last_bit + storage_element_size - 1) / storage_element_size` + ``position + first_bit / storage_element_size`` and covering + storage elements at least up to ``position + (last_bit + storage_element_size - 1) / storage_element_size``` * the position of the component is interpreted relative to that machine scalar. If no scalar storage order is specified for a type (either directly, or by inheritance in the case of a derived type), then the default is normally the native ordering of the target, but this default can be overridden using -pragma `Default_Scalar_Storage_Order`. +pragma ``Default_Scalar_Storage_Order``. -Note that if a component of `T` is itself of a record or array type, -the specfied `Scalar_Storage_Order` does *not* apply to that nested type: +Note that if a component of ``T`` is itself of a record or array type, +the specfied ``Scalar_Storage_Order`` does *not* apply to that nested type: an explicit attribute definition clause must be provided for the component type as well if desired. @@ -1036,8 +1037,8 @@ Attribute Simple_Storage_Pool .. index:: Simple_Storage_Pool -For every nonformal, nonderived access-to-object type `Acc`, the -representation attribute `Simple_Storage_Pool` may be specified +For every nonformal, nonderived access-to-object type ``Acc``, the +representation attribute ``Simple_Storage_Pool`` may be specified via an attribute_definition_clause (or by specifying the equivalent aspect): .. code-block:: ada @@ -1051,7 +1052,7 @@ via an attribute_definition_clause (or by specifying the equivalent aspect): The name given in an attribute_definition_clause for the -`Simple_Storage_Pool` attribute shall denote a variable of +``Simple_Storage_Pool`` attribute shall denote a variable of a 'simple storage pool type' (see pragma `Simple_Storage_Pool_Type`). The use of this attribute is only allowed for a prefix denoting a type @@ -1059,35 +1060,35 @@ for which it has been specified. The type of the attribute is the type of the variable specified as the simple storage pool of the access type, and the attribute denotes that variable. -It is illegal to specify both `Storage_Pool` and `Simple_Storage_Pool` +It is illegal to specify both ``Storage_Pool`` and ``Simple_Storage_Pool`` for the same access type. -If the `Simple_Storage_Pool` attribute has been specified for an access -type, then applying the `Storage_Pool` attribute to the type is flagged -with a warning and its evaluation raises the exception `Program_Error`. +If the ``Simple_Storage_Pool`` attribute has been specified for an access +type, then applying the ``Storage_Pool`` attribute to the type is flagged +with a warning and its evaluation raises the exception ``Program_Error``. If the Simple_Storage_Pool attribute has been specified for an access -type `S`, then the evaluation of the attribute ``S'Storage_Size`` +type ``S``, then the evaluation of the attribute ``S'Storage_Size`` returns the result of calling ``Storage_Size (S'Simple_Storage_Pool)``, which is intended to indicate the number of storage elements reserved for the simple storage pool. If the Storage_Size function has not been defined for the simple storage pool type, then this attribute returns zero. -If an access type `S` has a specified simple storage pool of type -`SSP`, then the evaluation of an allocator for that access type calls -the primitive `Allocate` procedure for type `SSP`, passing +If an access type ``S`` has a specified simple storage pool of type +``SSP``, then the evaluation of an allocator for that access type calls +the primitive ``Allocate`` procedure for type ``SSP``, passing ``S'Simple_Storage_Pool`` as the pool parameter. The detailed semantics of such allocators is the same as those defined for allocators in section 13.11 of the :title:`Ada Reference Manual`, with the term -`simple storage pool` substituted for `storage pool`. +*simple storage pool* substituted for *storage pool*. -If an access type `S` has a specified simple storage pool of type -`SSP`, then a call to an instance of the `Ada.Unchecked_Deallocation` -for that access type invokes the primitive `Deallocate` procedure -for type `SSP`, passing ``S'Simple_Storage_Pool`` as the pool +If an access type ``S`` has a specified simple storage pool of type +``SSP``, then a call to an instance of the ``Ada.Unchecked_Deallocation`` +for that access type invokes the primitive ``Deallocate`` procedure +for type ``SSP``, passing ``S'Simple_Storage_Pool`` as the pool parameter. The detailed semantics of such unchecked deallocations is the same as defined in section 13.11.2 of the Ada Reference Manual, except that the -term 'simple storage pool' is substituted for 'storage pool'. +term *simple storage pool* is substituted for *storage pool*. Attribute Small =============== @@ -1095,7 +1096,7 @@ Attribute Small .. index:: Small -The `Small` attribute is defined in Ada 95 (and Ada 2005) only for +The ``Small`` attribute is defined in Ada 95 (and Ada 2005) only for fixed-point types. GNAT also allows this attribute to be applied to floating-point types for compatibility with Ada 83. See @@ -1106,8 +1107,8 @@ Attribute Storage_Unit ====================== .. index:: Storage_Unit -`Standard'Storage_Unit` (`Standard` is the only permissible -prefix) provides the same value as `System.Storage_Unit`. +``Standard'Storage_Unit`` (``Standard`` is the only permissible +prefix) provides the same value as ``System.Storage_Unit``. Attribute Stub_Type =================== @@ -1122,12 +1123,12 @@ call on any dispatching operation of such a stub object does the remote call, if necessary, using the information in the stub object to locate the target partition, etc. -For a prefix `T` that denotes a remote access-to-classwide type, -`T'Stub_Type` denotes the type of the corresponding stub objects. +For a prefix ``T`` that denotes a remote access-to-classwide type, +``T'Stub_Type`` denotes the type of the corresponding stub objects. -By construction, the layout of `T'Stub_Type` is identical to that of -type `RACW_Stub_Type` declared in the internal implementation-defined -unit `System.Partition_Interface`. Use of this attribute will create +By construction, the layout of ``T'Stub_Type`` is identical to that of +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 System_Allocator_Alignment @@ -1136,7 +1137,7 @@ Attribute System_Allocator_Alignment .. index:: System_Allocator_Alignment -`Standard'System_Allocator_Alignment` (`Standard` is the only +``Standard'System_Allocator_Alignment`` (``Standard`` is the only permissible prefix) provides the observable guaranted to be honored by the system allocator (malloc). This is a static value that can be used in user storage pools based on malloc either to reject allocation @@ -1147,7 +1148,7 @@ Attribute Target_Name ===================== .. index:: Target_Name -`Standard'Target_Name` (`Standard` is the only permissible +``Standard'Target_Name`` (``Standard`` is the only permissible prefix) provides a static string value that identifies the target for the current compilation. For GCC implementations, this is the standard gcc target name without the terminating slash (for @@ -1157,10 +1158,10 @@ Attribute To_Address ==================== .. index:: To_Address -The `System'To_Address` -(`System` is the only permissible prefix) +The ``System'To_Address`` +(``System`` is the only permissible prefix) denotes a function identical to -`System.Storage_Elements.To_Address` except that +``System.Storage_Elements.To_Address`` except that it is a static attribute. This means that if its argument is a static expression, then the result of the attribute is a static expression. This means that such an expression can be @@ -1184,9 +1185,9 @@ Attribute Type_Class ==================== .. index:: Type_Class -``type'Type_Class`` for any type or subtype `type` yields -the value of the type class for the full type of `type`. If -`type` is a generic formal type, the value is the value for the +``typ'Type_Class`` for any type or subtype `typ` yields +the value of the type class for the full type of `typ`. If +`typ` is a generic formal type, the value is the value for the corresponding actual subtype. The value of this attribute is of type ``System.Aux_DEC.Type_Class``, which has the following definition: @@ -1204,7 +1205,7 @@ corresponding actual subtype. The value of this attribute is of type Type_Class_Address); -Protected types yield the value `Type_Class_Task`, which thus +Protected types yield the value ``Type_Class_Task``, which thus applies to all concurrent types. This attribute is designed to be compatible with the DEC Ada 83 attribute of the same name. @@ -1212,7 +1213,7 @@ Attribute Type_Key ================== .. index:: Type_Key -The `Type_Key` attribute is applicable to a type or subtype and +The ``Type_Key`` attribute is applicable to a type or subtype and yields a value of type Standard.String containing encoded information about the type or subtype. This provides improved compatibility with other implementations that support this attribute. @@ -1228,10 +1229,10 @@ Attribute Unconstrained_Array ============================= .. index:: Unconstrained_Array -The `Unconstrained_Array` attribute can be used with a prefix that +The ``Unconstrained_Array`` attribute can be used with a prefix that denotes any type or subtype. It is a static attribute that yields -`True` if the prefix designates an unconstrained array, -and `False` otherwise. In a generic instance, the result is +``True`` if the prefix designates an unconstrained array, +and ``False`` otherwise. In a generic instance, the result is still static, and yields the result of applying this test to the generic actual. @@ -1241,7 +1242,7 @@ Attribute Universal_Literal_String .. index:: Universal_Literal_String -The prefix of `Universal_Literal_String` must be a named +The prefix of ``Universal_Literal_String`` must be a named number. The static result is the string consisting of the characters of the number as defined in the original source. This allows the user program to access the actual text of named numbers without intermediate @@ -1266,18 +1267,18 @@ Attribute Unrestricted_Access .. index:: Unrestricted_Access -The `Unrestricted_Access` attribute is similar to `Access` +The ``Unrestricted_Access`` attribute is similar to ``Access`` except that all accessibility and aliased view checks are omitted. This is a user-beware attribute. -For objects, it is similar to `Address`, for which it is a +For objects, it is similar to ``Address``, for which it is a desirable replacement where the value desired is an access type. In other words, its effect is similar to first applying the -`Address` attribute and then doing an unchecked conversion to a +``Address`` attribute and then doing an unchecked conversion to a desired access type. -For subprograms, `P'Unrestricted_Access` may be used where -`P'Access` would be illegal, to construct a value of a +For subprograms, ``P'Unrestricted_Access`` may be used where +``P'Access`` would be illegal, to construct a value of a less-nested named access type that designates a more-nested subprogram. This value may be used in indirect calls, so long as the more-nested subprogram still exists; once the subprogram containing it @@ -1314,11 +1315,11 @@ When P1 is called from P2, the call via Global is OK, but if P1 were called after P2 returns, it would be an erroneous use of a dangling pointer. -For objects, it is possible to use `Unrestricted_Access` for any +For objects, it is possible to use ``Unrestricted_Access`` for any type. However, if the result is of an access-to-unconstrained array subtype, then the resulting pointer has the same scope as the context of the attribute, and must not be returned to some enclosing scope. -For instance, if a function uses `Unrestricted_Access` to create +For instance, if a function uses ``Unrestricted_Access`` to create an access-to-unconstrained-array and returns that value to the caller, the result will involve dangling pointers. In addition, it is only valid to create pointers to unconstrained arrays using this attribute @@ -1398,17 +1399,17 @@ considered to be erroneous. Consider the following example: A normal unconstrained array value or a constrained array object marked as aliased has the bounds in memory just before the array, so a thin pointer can retrieve both the data and -the bounds. But in this case, the non-aliased object `X` does not have the -bounds before the string. If the size clause for type `A` +the bounds. But in this case, the non-aliased object ``X`` does not have the +bounds before the string. If the size clause for type ``A`` were not present, then the pointer would be a fat pointer, where one component is a pointer to the bounds, and all would be well. But with the size clause present, the conversion from fat pointer to thin pointer in the call loses the bounds, and so this -is erroneous, and the program likely raises a `Program_Error` exception. +is erroneous, and the program likely raises a ``Program_Error`` exception. In general, it is advisable to completely avoid mixing the use of thin pointers and the use of -`Unrestricted_Access` where the designated type is an +``Unrestricted_Access`` where the designated type is an unconstrained array. The use of thin pointers should be restricted to cases of porting legacy code that implicitly assumes the size of pointers, and such code should not in any case be using this attribute. @@ -1431,8 +1432,8 @@ Here we attempt to modify the constant P from 4 to 3, but the compiler may or may not notice this attempt, and subsequent references to P may yield either the value 3 or the value 4 or the assignment may blow up if the compiler decides to put P in read-only memory. One particular case where -`Unrestricted_Access` can be used in this way is to modify the -value of an `IN` parameter: +``Unrestricted_Access`` can be used in this way is to modify the +value of an ``in`` parameter: .. code-block:: ada @@ -1445,14 +1446,14 @@ value of an `IN` parameter: In general this is a risky approach. It may appear to "work" but such uses of -`Unrestricted_Access` are potentially non-portable, even from one version -of `GNAT` to another, so are best avoided if possible. +``Unrestricted_Access`` are potentially non-portable, even from one version +of GNAT to another, so are best avoided if possible. Attribute Update ================ .. index:: Update -The `Update` attribute creates a copy of an array or record value +The ``Update`` attribute creates a copy of an array or record value with one or more modified components. The syntax is:: PREFIX'Update ( RECORD_COMPONENT_ASSOCIATION_LIST ) @@ -1465,9 +1466,9 @@ with one or more modified components. The syntax is:: INDEX_EXPRESSION_LIST ::= ( EXPRESSION {, EXPRESSION } ) -where `PREFIX` is the name of an array or record object, the -association list in parentheses does not contain an `others` -choice and the box symbol `<>` may not appear in any +where ``PREFIX`` is the name of an array or record object, the +association list in parentheses does not contain an ``others`` +choice and the box symbol ``<>`` may not appear in any expression. The effect is to yield a copy of the array or record value which is unchanged apart from the components mentioned in the association list, which are changed to the indicated value. The @@ -1482,7 +1483,7 @@ example: Avar2 : Arr := Avar1'Update (2 => 10, 3 .. 4 => 20); -yields a value for `Avar2` of 1,10,20,20,5 with `Avar1` +yields a value for ``Avar2`` of 1,10,20,20,5 with ``Avar1`` begin unmodified. Similarly: .. code-block:: ada @@ -1493,8 +1494,8 @@ begin unmodified. Similarly: Rvar2 : Rec := Rvar1'Update (B => 20); -yields a value for `Rvar2` of (A => 1, B => 20, C => 3), -with `Rvar1` being unmodifed. +yields a value for ``Rvar2`` of (A => 1, B => 20, C => 3), +with ``Rvar1`` being unmodifed. Note that the value of the attribute reference is computed completely before it is used. This means that if you write: @@ -1503,13 +1504,13 @@ completely before it is used. This means that if you write: Avar1 := Avar1'Update (1 => 10, 2 => Function_Call); -then the value of `Avar1` is not modified if `Function_Call` +then the value of ``Avar1`` is not modified if ``Function_Call`` raises an exception, unlike the effect of a series of direct assignments -to elements of `Avar1`. In general this requires that +to elements of ``Avar1``. In general this requires that two extra complete copies of the object are required, which should be kept in mind when considering efficiency. -The `Update` attribute cannot be applied to prefixes of a limited +The ``Update`` attribute cannot be applied to prefixes of a limited type, and cannot reference discriminants in the case of a record type. The accessibility level of an Update attribute result object is defined as for an aggregate. @@ -1533,29 +1534,29 @@ Attribute Valid_Scalars ======================= .. index:: Valid_Scalars -The `'Valid_Scalars` attribute is intended to make it easier to +The ``'Valid_Scalars`` attribute is intended to make it easier to check the validity of scalar subcomponents of composite objects. It -is defined for any prefix `X` that denotes an object. +is defined for any prefix ``X`` that denotes an object. The value of this attribute is of the predefined type Boolean. -`X'Valid_Scalars` yields True if and only if evaluation of -`P'Valid` yields True for every scalar part P of X or if X has +``X'Valid_Scalars`` yields True if and only if evaluation of +``P'Valid`` yields True for every scalar part P of X or if X has no scalar parts. It is not specified in what order the scalar parts are checked, nor whether any more are checked after any one of them -is determined to be invalid. If the prefix `X` is of a class-wide -type `T'Class` (where `T` is the associated specific type), -or if the prefix `X` is of a specific tagged type `T`, then -only the scalar parts of components of `T` are traversed; in other -words, components of extensions of `T` are not traversed even if -`T'Class (X)'Tag /= T'Tag` . The compiler will issue a warning if it can +is determined to be invalid. If the prefix ``X`` is of a class-wide +type ``T'Class`` (where ``T`` is the associated specific type), +or if the prefix ``X`` is of a specific tagged type ``T``, then +only the scalar parts of components of ``T`` are traversed; in other +words, components of extensions of ``T`` are not traversed even if +``T'Class (X)'Tag /= T'Tag`` . The compiler will issue a warning if it can be determined at compile time that the prefix of the attribute has no scalar parts (e.g., if the prefix is of an access type, an interface type, an undiscriminated task type, or an undiscriminated protected type). -For scalar types, `Valid_Scalars` is equivalent to `Valid`. The use -of this attribute is not permitted for `Unchecked_Union` types for which +For scalar types, ``Valid_Scalars`` is equivalent to ``Valid``. The use +of this attribute is not permitted for ``Unchecked_Union`` types for which in general it is not possible to determine the values of the discriminants. -Note: `Valid_Scalars` can generate a lot of code, especially in the case +Note: ``Valid_Scalars`` can generate a lot of code, especially in the case of a large variant record. If the attribute is called in many places in the same program applied to objects of the same type, it can reduce program size to write a function with a single use of the attribute, and then call that @@ -1567,13 +1568,13 @@ Attribute VADS_Size .. index:: VADS_Size -The `'VADS_Size` attribute is intended to make it easier to port -legacy code which relies on the semantics of `'Size` as implemented +The ``'VADS_Size`` attribute is intended to make it easier to port +legacy code which relies on the semantics of ``'Size`` as implemented by the VADS Ada 83 compiler. GNAT makes a best effort at duplicating the -same semantic interpretation. In particular, `'VADS_Size` applied +same semantic interpretation. In particular, ``'VADS_Size`` applied to a predefined or other primitive type with no Size clause yields the -Object_Size (for example, `Natural'Size` is 32 rather than 31 on -typical machines). In addition `'VADS_Size` applied to an object +Object_Size (for example, ``Natural'Size`` is 32 rather than 31 on +typical machines). In addition ``'VADS_Size`` applied to an object gives the result that would be obtained by applying the attribute to the corresponding type. @@ -1587,22 +1588,22 @@ Attribute Value_Size ``type'Value_Size`` is the number of bits required to represent a value of the given subtype. It is the same as ``type'Size``, -but, unlike `Size`, may be set for non-first subtypes. +but, unlike ``Size``, may be set for non-first subtypes. Attribute Wchar_T_Size ====================== .. index:: Wchar_T_Size -`Standard'Wchar_T_Size` (`Standard` is the only permissible -prefix) provides the size in bits of the C `wchar_t` type +``Standard'Wchar_T_Size`` (``Standard`` is the only permissible +prefix) provides the size in bits of the C ``wchar_t`` type primarily for constructing the definition of this type in -package `Interfaces.C`. The result is a static constant. +package ``Interfaces.C``. The result is a static constant. Attribute Word_Size =================== .. index:: Word_Size -`Standard'Word_Size` (`Standard` is the only permissible -prefix) provides the value `System.Word_Size`. The result is +``Standard'Word_Size`` (``Standard`` is the only permissible +prefix) provides the value ``System.Word_Size``. The result is a static constant. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst index 10c4a09..44d2993 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst @@ -45,7 +45,7 @@ There are no variations from the standard. "Which code_statements cause external interactions. See 1.1.3(10)." -Any `code_statement` can potentially cause external interactions. +Any *code_statement* can potentially cause external interactions. * "The coded representation for the text of an Ada @@ -80,16 +80,16 @@ length of a lexical element is the same as the maximum line length. See :ref:`Implementation_Defined_Pragmas`. * - "Effect of pragma `Optimize`. See 2.8(27)." + "Effect of pragma ``Optimize``. See 2.8(27)." -Pragma `Optimize`, if given with a `Time` or `Space` +Pragma ``Optimize``, if given with a ``Time`` or ``Space`` parameter, checks that the optimization flag is set, and aborts if it is not. * "The sequence of characters of the value returned by ``S'Image`` when some of the graphic characters of - ``S'Wide_Image`` are not defined in `Character`. See + ``S'Wide_Image`` are not defined in ``Character``. See 3.5(37)." The sequence of characters is as defined by the wide character encoding @@ -98,7 +98,7 @@ further details. * "The predefined integer types declared in - `Standard`. See 3.5.4(25)." + ``Standard``. See 3.5.4(25)." ====================== ======================================= Type Representation @@ -132,7 +132,7 @@ The precision and range is as defined by the IEEE standard. * "The predefined floating point types declared in - `Standard`. See 3.5.7(16)." + ``Standard``. See 3.5.7(16)." ====================== ==================================================== Type Representation @@ -146,14 +146,14 @@ Type Representation * "The small of an ordinary fixed point type. See 3.5.9(8)." -`Fine_Delta` is 2**(-63) +``Fine_Delta`` is 2**(-63) * "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. +``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 ia32), then the output from Text_IO is accurate to only 53 bits, rather than the full mantissa. This @@ -161,10 +161,10 @@ is because floating-point conversions are used to convert fixed point. * - "The result of `Tags.Expanded_Name` for types declared - within an unnamed `block_statement`. See 3.9(10)." + "The result of ``Tags.Expanded_Name`` for types declared + within an unnamed *block_statement*. See 3.9(10)." -Block numbers of the form `B`nnn``, where `nnn` is a +Block numbers of the form :samp:`B{nnn}`, where *nnn* is a decimal integer are allocated. * @@ -181,33 +181,33 @@ There are no implementation-defined time types. "The time base associated with relative delays." See 9.6(20). The time base used is that provided by the C library -function `gettimeofday`. +function ``gettimeofday``. * - "The time base of the type `Calendar.Time`. See + "The time base of the type ``Calendar.Time``. See 9.6(23)." The time base used is that provided by the C library function -`gettimeofday`. +``gettimeofday``. * - "The time zone used for package `Calendar` + "The time zone used for package ``Calendar`` operations. See 9.6(24)." -The time zone used by package `Calendar` is the current system time zone +The time zone used by package ``Calendar`` is the current system time zone setting for local time, as accessed by the C library function -`localtime`. +``localtime``. * - "Any limit on `delay_until_statements` of - `select_statements`. See 9.6(29)." + "Any limit on *delay_until_statements* of + *select_statements*. See 9.6(29)." There are no such limits. * "Whether or not two non-overlapping parts of a composite object are independently addressable, in the case where packing, record - layout, or `Component_Size` is specified for the object. See + layout, or ``Component_Size`` is specified for the object. See 9.10(1)." Separate components are independently addressable if they do not share @@ -253,7 +253,7 @@ provides the binder options *-z* and *-n* respectively, and in this case a list of units can be explicitly supplied to the binder for inclusion in the partition (all units needed by these units will also be included automatically). For full details on the use of these -options, refer to the `GNAT Make Program gnatmake` in the +options, refer to *GNAT Make Program gnatmake* in the :title:`GNAT User's Guide`. * @@ -274,7 +274,7 @@ The main program is designated by providing the name of the corresponding :file:`ALI` file as the input parameter to the binder. * - "The order of elaboration of `library_items`. See + "The order of elaboration of *library_items*. See 10.2(18)." The first constraint on ordering is that it meets the requirements of @@ -293,7 +293,7 @@ where a choice still remains. The main program has no parameters. It may be a procedure, or a function returning an integer type. In the latter case, the returned integer value is the return code of the program (overriding any value that -may have been set by a call to `Ada.Command_Line.Set_Exit_Status`). +may have been set by a call to ``Ada.Command_Line.Set_Exit_Status``). * "The mechanisms for building and running partitions. See @@ -320,24 +320,24 @@ provided by the operating system. See the GLADE reference manual for further details. * - "The information returned by `Exception_Message`. See + "The information returned by ``Exception_Message``. See 11.4.1(10)." Exception message returns the null string unless a specific message has been passed by the program. * - "The result of `Exceptions.Exception_Name` for types - declared within an unnamed `block_statement`. See 11.4.1(12)." + "The result of ``Exceptions.Exception_Name`` for types + declared within an unnamed *block_statement*. See 11.4.1(12)." -Blocks have implementation defined names of the form `B`nnn`` -where `nnn` is an integer. +Blocks have implementation defined names of the form :samp:`B{nnn}` +where *nnn* is an integer. * "The information returned by - `Exception_Information`. See 11.4.1(13)." + ``Exception_Information``. See 11.4.1(13)." -`Exception_Information` returns a string in the following format:: +``Exception_Information`` returns a string in the following format:: *Exception_Name:* nnnnn *Message:* mmmmm @@ -348,12 +348,12 @@ where `nnn` is an integer. where - * `nnnn` is the fully qualified name of the exception in all upper + * ``nnnn`` is the fully qualified name of the exception in all upper case letters. This line is always present. - * `mmmm` is the message (this line present only if message is non-null) + * ``mmmm`` is the message (this line present only if message is non-null) - * `ppp` is the Process Id value as a decimal integer (this line is + * ``ppp`` is the Process Id value as a decimal integer (this line is present only if the Process Id is nonzero). Currently we are not making use of this field. @@ -364,7 +364,7 @@ where the main executable. The values are given in C style format, with lower case letters for a-f, and only as many digits present as are necessary. The line terminator sequence at the end of each line, including - the last line is a single `LF` character (`16#0A#`). + the last line is a single ``LF`` character (``16#0A#``). * "Implementation-defined check names. See 11.5(27)." @@ -373,7 +373,7 @@ The implementation defined check names include Alignment_Check, Atomic_Synchronization, Duplicated_Tag_Check, Container_Checks, Tampering_Check, Predicate_Check, and Validity_Check. In addition, a user program can add implementation-defined check names by means of the pragma -Check_Name. See the description of pragma `Suppress` for full details. +Check_Name. See the description of pragma ``Suppress`` for full details. * "The interpretation of each aspect of representation. See @@ -388,7 +388,7 @@ See separate section on data representations. See separate section on data representations. * - "The meaning of `Size` for indefinite subtypes. See + "The meaning of ``Size`` for indefinite subtypes. See 13.3(48)." Size for an indefinite subtype is the maximum possible size, except that @@ -416,15 +416,15 @@ The only implementation defined component is the tag for a tagged type, which contains a pointer to the dispatching table. * - "If `Word_Size` = `Storage_Unit`, the default bit + "If ``Word_Size`` = ``Storage_Unit``, the default bit ordering. See 13.5.3(5)." -`Word_Size` (32) is not the same as `Storage_Unit` (8) for this +``Word_Size`` (32) is not the same as ``Storage_Unit`` (8) for this implementation, so no non-default bit ordering is supported. The default bit ordering corresponds to the natural endianness of the target architecture. * - "The contents of the visible part of package `System` + "The contents of the visible part of package ``System`` and its language-defined children. See 13.7(2)." See the definition of these packages in files :file:`system.ads` and @@ -438,8 +438,8 @@ System. * "The contents of the visible part of package - `System.Machine_Code`, and the meaning of - `code_statements`. See 13.8(7)." + ``System.Machine_Code``, and the meaning of + *code_statements*. See 13.8(7)." See the definition and documentation in file :file:`s-maccod.ads`. @@ -487,14 +487,14 @@ on the simple assignment of the invalid negative value from Y to Z. * "The manner of choosing a storage pool for an access type - when `Storage_Pool` is not specified for the type. See 13.11(17)." + when ``Storage_Pool`` is not specified for the type. See 13.11(17)." There are 3 different standard pools used by the compiler when -`Storage_Pool` is not specified depending whether the type is local +``Storage_Pool`` is not specified depending whether the type is local to a subprogram or defined at the library level and whether -`Storage_Size`is specified or not. See documentation in the runtime -library units `System.Pool_Global`, `System.Pool_Size` and -`System.Pool_Local` in files :file:`s-poosiz.ads`, +``Storage_Size``is specified or not. See documentation in the runtime +library units ``System.Pool_Global``, ``System.Pool_Size`` and +``System.Pool_Local`` in files :file:`s-poosiz.ads`, :file:`s-pooglo.ads` and :file:`s-pooloc.ads` for full details on the default pools used. @@ -503,13 +503,13 @@ default pools used. names for the standard pool type(s). See 13.11(17)." See documentation in the sources of the run time mentioned in the previous -paragraph. All these pools are accessible by means of `with`'ing +paragraph. All these pools are accessible by means of `with`\ ing these units. * - "The meaning of `Storage_Size`. See 13.11(18)." + "The meaning of ``Storage_Size``. See 13.11(18)." -`Storage_Size` is measured in storage units, and refers to the +``Storage_Size`` is measured in storage units, and refers to the total space available for an access type collection, or to the primary stack space for a task. @@ -523,21 +523,21 @@ for details on GNAT-defined aspects of storage pools. * "The set of restrictions allowed in a pragma - `Restrictions`. See 13.12(7)." + ``Restrictions``. See 13.12(7)." See :ref:`Standard_and_Implementation_Defined_Restrictions`. * "The consequences of violating limitations on - `Restrictions` pragmas. See 13.12(9)." + ``Restrictions`` pragmas. See 13.12(9)." Restrictions that can be checked at compile time result in illegalities if violated. Currently there are no other consequences of violating restrictions. * - "The representation used by the `Read` and - `Write` attributes of elementary types in terms of stream + "The representation used by the ``Read`` and + ``Write`` attributes of elementary types in terms of stream elements. See 13.13.2(9)." The representation is the in-memory representation of the base type of @@ -546,15 +546,15 @@ the type, using the number of bits corresponding to the * "The names and characteristics of the numeric subtypes - declared in the visible part of package `Standard`. See A.1(3)." + declared in the visible part of package ``Standard``. See A.1(3)." See items describing the integer and floating-point types supported. * - "The string returned by `Character_Set_Version`. + "The string returned by ``Character_Set_Version``. See A.3.5(3)." -`Ada.Wide_Characters.Handling.Character_Set_Version` returns +``Ada.Wide_Characters.Handling.Character_Set_Version`` returns the string "Unicode 4.0", referring to version 4.0 of the Unicode specification. @@ -567,21 +567,21 @@ library. Only fast math mode is implemented. * "The sign of a zero result from some of the operators or - functions in `Numerics.Generic_Elementary_Functions`, when - `Float_Type'Signed_Zeros` is `True`. See A.5.1(46)." + functions in ``Numerics.Generic_Elementary_Functions``, when + ``Float_Type'Signed_Zeros`` is ``True``. See A.5.1(46)." The sign of zeroes follows the requirements of the IEEE 754 standard on floating-point. * "The value of - `Numerics.Float_Random.Max_Image_Width`. See A.5.2(27)." + ``Numerics.Float_Random.Max_Image_Width``. See A.5.2(27)." Maximum image width is 6864, see library file :file:`s-rannum.ads`. * "The value of - `Numerics.Discrete_Random.Max_Image_Width`. See A.5.2(27)." + ``Numerics.Discrete_Random.Max_Image_Width``. See A.5.2(27)." Maximum image width is 6864, see library file :file:`s-rannum.ads`. @@ -610,13 +610,13 @@ The minimum period between reset calls to guarantee distinct series of random numbers is one microsecond. * - "The values of the `Model_Mantissa`, - `Model_Emin`, `Model_Epsilon`, `Model`, - `Safe_First`, and `Safe_Last` attributes, if the Numerics + "The values of the ``Model_Mantissa``, + ``Model_Emin``, ``Model_Epsilon``, ``Model``, + ``Safe_First``, and ``Safe_Last`` attributes, if the Numerics Annex is not supported. See A.5.3(72)." Run the compiler with *-gnatS* to produce a listing of package -`Standard`, has the values of all numeric attributes. +``Standard``, has the values of all numeric attributes. * "Any implementation-defined characteristics of the @@ -626,10 +626,10 @@ There are no special implementation defined characteristics for these packages. * - "The value of `Buffer_Size` in `Storage_IO`. See + "The value of ``Buffer_Size`` in ``Storage_IO``. See A.9(10)." -All type representations are contiguous, and the `Buffer_Size` is +All type representations are contiguous, and the ``Buffer_Size`` is the value of ``type'Size`` rounded up to the next storage unit boundary. @@ -641,7 +641,7 @@ These files are mapped onto the files provided by the C streams libraries. See source file :file:`i-cstrea.ads` for further details. * - "The accuracy of the value produced by `Put`. See + "The accuracy of the value produced by ``Put``. See A.10.9(36)." If more digits are requested in the output than are represented by the @@ -649,30 +649,30 @@ precision of the value, zeroes are output in the corresponding least significant digit positions. * - "The meaning of `Argument_Count`, `Argument`, and - `Command_Name`. See A.15(1)." + "The meaning of ``Argument_Count``, ``Argument``, and + ``Command_Name``. See A.15(1)." -These are mapped onto the `argv` and `argc` parameters of the +These are mapped onto the ``argv`` and ``argc`` parameters of the main program in the natural manner. * - "The interpretation of the `Form` parameter in procedure - `Create_Directory`. See A.16(56)." + "The interpretation of the ``Form`` parameter in procedure + ``Create_Directory``. See A.16(56)." -The `Form` parameter is not used. +The ``Form`` parameter is not used. * - "The interpretation of the `Form` parameter in procedure - `Create_Path`. See A.16(60)." + "The interpretation of the ``Form`` parameter in procedure + ``Create_Path``. See A.16(60)." -The `Form` parameter is not used. +The ``Form`` parameter is not used. * - "The interpretation of the `Form` parameter in procedure - `Copy_File`. See A.16(68)." + "The interpretation of the ``Form`` parameter in procedure + ``Copy_File``. See A.16(68)." -The `Form` parameter is case-insensitive. -Two fields are recognized in the `Form` parameter:: +The ``Form`` parameter is case-insensitive. +Two fields are recognized in the ``Form`` parameter:: *preserve=<value>* *mode=<value>* @@ -721,13 +721,13 @@ Examples of incorrect Forms:: Form => "mode=internal, preserve=timestamps" * - "The interpretation of the `Pattern` parameter, when not the null string, - in the `Start_Search` and `Search` procedures. + "The interpretation of the ``Pattern`` parameter, when not the null string, + in the ``Start_Search`` and ``Search`` procedures. See A.16(104) and A.16(112)." -When the `Pattern` parameter is not the null string, it is interpreted +When the ``Pattern`` parameter is not the null string, it is interpreted according to the syntax of regular expressions as defined in the -`GNAT.Regexp` package. +``GNAT.Regexp`` package. See :ref:`GNAT.Regexp_(g-regexp.ads)`. @@ -757,7 +757,7 @@ Convention Name Interpretation *Default* Treated the same as C *External* Treated the same as C *Fortran* Fortran -*Intrinsic* For support of pragma `Import` with convention Intrinsic, see +*Intrinsic* For support of pragma ``Import`` with convention Intrinsic, see separate section on Intrinsic Subprograms. *Stdcall* Stdcall (used for Windows implementations only). This convention correspond to the WINAPI (previously called Pascal convention) C/C++ convention under @@ -767,8 +767,8 @@ Convention Name Interpretation *Win32* Synonym for Stdcall *Stubbed* Stubbed is a special convention used to indicate that the body of the subprogram will be entirely ignored. Any call to the subprogram - is converted into a raise of the `Program_Error` exception. If a - pragma `Import` specifies convention `stubbed` then no body need + is converted into a raise of the ``Program_Error`` exception. If a + pragma ``Import`` specifies convention ``stubbed`` then no body need be present at all. This convention is useful during development for the inclusion of subprograms whose body has not yet been written. In addition, all otherwise unrecognized convention names are also @@ -792,9 +792,9 @@ external language, interpreting the Ada name as being in all lower case letters. * - "The effect of pragma `Linker_Options`. See B.1(37)." + "The effect of pragma ``Linker_Options``. See B.1(37)." -The string passed to `Linker_Options` is presented uninterpreted as +The string passed to ``Linker_Options`` is presented uninterpreted as an argument to the link command, unless it contains ASCII.NUL characters. NUL characters if they appear act as argument separators, so for example @@ -802,7 +802,7 @@ NUL characters if they appear act as argument separators, so for example pragma Linker_Options ("-labc" & ASCII.NUL & "-ldef"); -causes two separate arguments `-labc` and `-ldef` to be passed to the +causes two separate arguments ``-labc`` and ``-ldef`` to be passed to the linker. The order of linker options is preserved for a given unit. The final list of options passed to the linker is in reverse order of the elaboration order. For example, linker options for a body always appear before the options @@ -810,23 +810,23 @@ from the corresponding package spec. * "The contents of the visible part of package - `Interfaces` and its language-defined descendants. See B.2(1)." + ``Interfaces`` and its language-defined descendants. See B.2(1)." See files with prefix :file:`i-` in the distributed library. * "Implementation-defined children of package - `Interfaces`. The contents of the visible part of package - `Interfaces`. See B.2(11)." + ``Interfaces``. The contents of the visible part of package + ``Interfaces``. See B.2(11)." See files with prefix :file:`i-` in the distributed library. * - "The types `Floating`, `Long_Floating`, - `Binary`, `Long_Binary`, `Decimal_ Element`, and - `COBOL_Character`; and the initialization of the variables - `Ada_To_COBOL` and `COBOL_To_Ada`, in - `Interfaces.COBOL`. See B.4(50)." + "The types ``Floating``, ``Long_Floating``, + ``Binary``, ``Long_Binary``, ``Decimal_ Element``, and + ``COBOL_Character``; and the initialization of the variables + ``Ada_To_COBOL`` and ``COBOL_To_Ada``, in + ``Interfaces.COBOL``. See B.4(50)." ===================== ==================================== COBOL Ada @@ -857,7 +857,7 @@ See documentation in file :file:`s-maccod.ads` in the distributed library. Interrupts are mapped to signals or conditions as appropriate. See definition of unit -`Ada.Interrupt_Names` in source file :file:`a-intnam.ads` for details +``Ada.Interrupt_Names`` in source file :file:`a-intnam.ads` for details on the interrupts supported on a particular target. * @@ -868,25 +868,25 @@ GNAT does not permit a partition to be restarted without reloading, except under control of the debugger. * - "The semantics of pragma `Discard_Names`. See C.5(7)." + "The semantics of pragma ``Discard_Names``. See C.5(7)." -Pragma `Discard_Names` causes names of enumeration literals to +Pragma ``Discard_Names`` causes names of enumeration literals to be suppressed. In the presence of this pragma, the Image attribute provides the image of the Pos of the literal, and Value accepts Pos values. * - "The result of the `Task_Identification.Image` + "The result of the ``Task_Identification.Image`` attribute. See C.7.1(7)." The result of this attribute is a string that identifies -the object or component that denotes a given task. If a variable `Var` -has a task type, the image for this task will have the form `Var_`XXXXXXXX``, -where the suffix +the object or component that denotes a given task. If a variable ``Var`` +has a task type, the image for this task will have the form :samp:`Var_{XXXXXXXX}`, +where the suffix *XXXXXXXX* is the hexadecimal representation of the virtual address of the corresponding task control block. If the variable is an array of tasks, the image of each task will have the form of an indexed component indicating the position of a -given task in the array, e.g., `Group(5)_`XXXXXXX``. If the task is a +given task in the array, e.g., :samp:`Group(5)_{XXXXXXX}`. If the task is a component of a record, the image of the task will have the form of a selected component. These rules are fully recursive, so that the image of a task that is a subcomponent of a composite object corresponds to the expression that @@ -904,28 +904,30 @@ the numeric suffix, that is to say the hexadecimal representation of the virtual address of the control block of the task. * - "The value of `Current_Task` when in a protected entry + "The value of ``Current_Task`` when in a protected entry or interrupt handler. See C.7.1(17)." Protected entries or interrupt handlers can be executed by any -convenient thread, so the value of `Current_Task` is undefined. +convenient thread, so the value of ``Current_Task`` is undefined. * - "The effect of calling `Current_Task` from an entry + "The effect of calling ``Current_Task`` from an entry body or interrupt handler. See C.7.1(19)." -The effect of calling `Current_Task` from an entry body or -interrupt handler is to return the identification of the task currently -executing the code. +When GNAT can determine statically that ``Current_Task`` is called directly in +the body of an entry (or barrier) then a warning is emitted and ``Program_Error`` +is raised at run time. Otherwise, the effect of calling ``Current_Task`` from an +entry body or interrupt handler is to return the identification of the task +currently executing the code. * "Implementation-defined aspects of - `Task_Attributes`. See C.7.2(19)." + ``Task_Attributes``. See C.7.2(19)." -There are no implementation-defined aspects of `Task_Attributes`. +There are no implementation-defined aspects of ``Task_Attributes``. * - "Values of all `Metrics`. See D(2)." + "Values of all ``Metrics``. See D(2)." The metrics information for GNAT depends on the performance of the underlying operating system. The sources of the run-time for tasking @@ -937,8 +939,8 @@ on the exact target in use, this information can be used to determine the required metrics. * - "The declarations of `Any_Priority` and - `Priority`. See D.1(11)." + "The declarations of ``Any_Priority`` and + ``Priority``. See D.1(11)." See declarations in file :file:`system.ads`. @@ -963,8 +965,8 @@ and appropriate, these threads correspond to native threads of the underlying operating system. * - "Implementation-defined `policy_identifiers` allowed - in a pragma `Task_Dispatching_Policy`. See D.2.2(3)." + "Implementation-defined *policy_identifiers* allowed + in a pragma ``Task_Dispatching_Policy``. See D.2.2(3)." There are no implementation-defined policy-identifiers allowed in this pragma. @@ -982,16 +984,16 @@ of delay expirations for lower priority tasks. The policy is the same as that of the underlying threads implementation. * - "Implementation-defined `policy_identifiers` allowed - in a pragma `Locking_Policy`. See D.3(4)." + "Implementation-defined *policy_identifiers* allowed + in a pragma ``Locking_Policy``. See D.3(4)." The two implementation defined policies permitted in GNAT are -`Inheritance_Locking` and `Concurrent_Readers_Locking`. On -targets that support the `Inheritance_Locking` policy, locking is +``Inheritance_Locking`` and ``Concurrent_Readers_Locking``. On +targets that support the ``Inheritance_Locking`` policy, locking is implemented by inheritance, i.e., the task owning the lock operates at a priority equal to the highest priority of any task currently requesting the lock. On targets that support the -`Concurrent_Readers_Locking` policy, locking is implemented with a +``Concurrent_Readers_Locking`` policy, locking is implemented with a read/write lock allowing multiple protected object functions to enter concurrently. @@ -999,7 +1001,7 @@ concurrently. "Default ceiling priorities. See D.3(10)." The ceiling priority of protected objects of the type -`System.Interrupt_Priority'Last` as described in the Ada +``System.Interrupt_Priority'Last`` as described in the Ada Reference Manual D.3(10), * @@ -1007,7 +1009,7 @@ Reference Manual D.3(10), the implementation. See D.3(16)." The ceiling priority of internal protected objects is -`System.Priority'Last`. +``System.Priority'Last``. * "Implementation-defined queuing policies. See D.4(1)." @@ -1031,25 +1033,25 @@ task creation. * "What happens when a task terminates in the presence of - pragma `No_Task_Termination`. See D.7(15)." + pragma ``No_Task_Termination``. See D.7(15)." Execution is erroneous in that case. * "Implementation-defined aspects of pragma - `Restrictions`. See D.7(20)." + ``Restrictions``. See D.7(20)." There are no such implementation-defined aspects. * "Implementation-defined aspects of package - `Real_Time`. See D.8(17)." + ``Real_Time``. See D.8(17)." -There are no implementation defined aspects of package `Real_Time`. +There are no implementation defined aspects of package ``Real_Time``. * "Implementation-defined aspects of - `delay_statements`. See D.9(8)." + *delay_statements*. See D.9(8)." Any difference greater than one microsecond will cause the task to be delayed (see D.9(7)). @@ -1114,7 +1116,7 @@ implementation defined interfaces. * "The values of named numbers in the package - `Decimal`. See F.2(7)." + ``Decimal``. See F.2(7)." ==================== ========== Named Number Value @@ -1127,14 +1129,14 @@ Named Number Value ==================== ========== * - "The value of `Max_Picture_Length` in the package - `Text_IO.Editing`. See F.3.3(16)." + "The value of ``Max_Picture_Length`` in the package + ``Text_IO.Editing``. See F.3.3(16)." 64 * - "The value of `Max_Picture_Length` in the package - `Wide_Text_IO.Editing`. See F.3.4(5)." + "The value of ``Max_Picture_Length`` in the package + ``Wide_Text_IO.Editing``. See F.3.4(5)." 64 @@ -1147,8 +1149,8 @@ operations. Only fast math mode is currently supported. * "The sign of a zero result (or a component thereof) from - any operator or function in `Numerics.Generic_Complex_Types`, when - `Real'Signed_Zeros` is True. See G.1.1(53)." + any operator or function in ``Numerics.Generic_Complex_Types``, when + ``Real'Signed_Zeros`` is True. See G.1.1(53)." The signs of zero values are as recommended by the relevant implementation advice. @@ -1156,8 +1158,8 @@ implementation advice. * "The sign of a zero result (or a component thereof) from any operator or function in - `Numerics.Generic_Complex_Elementary_Functions`, when - `Real'Signed_Zeros` is `True`. See G.1.2(45)." + ``Numerics.Generic_Complex_Elementary_Functions``, when + ``Real'Signed_Zeros`` is ``True``. See G.1.2(45)." The signs of zero values are as recommended by the relevant implementation advice. @@ -1179,8 +1181,8 @@ floating-point format. * "The result of a floating point arithmetic operation in - overflow situations, when the `Machine_Overflows` attribute of the - result type is `False`. See G.2.1(13)." + overflow situations, when the ``Machine_Overflows`` attribute of the + result type is ``False``. See G.2.1(13)." Infinite and NaN values are produced as dictated by the IEEE floating-point standard. @@ -1208,7 +1210,7 @@ floating-point, the operation is done in floating-point, and the result is converted to the target type. * - "Conditions on a `universal_real` operand of a fixed + "Conditions on a *universal_real* operand of a fixed point multiplication or division for which the result shall be in the perfect result set. See G.2.3(22)." @@ -1218,16 +1220,16 @@ representable in 64-bits. * "The result of a fixed point arithmetic operation in - overflow situations, when the `Machine_Overflows` attribute of the - result type is `False`. See G.2.3(27)." + overflow situations, when the ``Machine_Overflows`` attribute of the + result type is ``False``. See G.2.3(27)." -Not relevant, `Machine_Overflows` is `True` for fixed-point +Not relevant, ``Machine_Overflows`` is ``True`` for fixed-point types. * "The result of an elementary function reference in - overflow situations, when the `Machine_Overflows` attribute of the - result type is `False`. See G.2.4(4)." + overflow situations, when the ``Machine_Overflows`` attribute of the + result type is ``False``. See G.2.4(4)." IEEE infinite and Nan values are produced as appropriate. @@ -1248,8 +1250,8 @@ Information on this subject is not yet available. * "The result of a complex arithmetic operation or complex elementary function reference in overflow situations, when the - `Machine_Overflows` attribute of the corresponding real type is - `False`. See G.2.6(5)." + ``Machine_Overflows`` attribute of the corresponding real type is + ``False``. See G.2.6(5)." IEEE infinite and Nan values are produced as appropriate. @@ -1268,21 +1270,21 @@ Information on this subject is not yet available. * "Implementation-defined aspects of pragma - `Inspection_Point`. See H.3.2(8)." + ``Inspection_Point``. See H.3.2(8)." -Pragma `Inspection_Point` ensures that the variable is live and can +Pragma ``Inspection_Point`` ensures that the variable is live and can be examined by the debugger at the inspection point. * "Implementation-defined aspects of pragma - `Restrictions`. See H.4(25)." + ``Restrictions``. See H.4(25)." -There are no implementation-defined aspects of pragma `Restrictions`. The -use of pragma `Restrictions [No_Exceptions]` has no effect on the -generated code. Checks must suppressed by use of pragma `Suppress`. +There are no implementation-defined aspects of pragma ``Restrictions``. The +use of pragma ``Restrictions [No_Exceptions]`` has no effect on the +generated code. Checks must suppressed by use of pragma ``Suppress``. * - "Any restrictions on pragma `Restrictions`. See + "Any restrictions on pragma ``Restrictions``. See H.4(27)." -There are no restrictions on pragma `Restrictions`. +There are no restrictions on pragma ``Restrictions``. diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index e5f0c82..3053013 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -1,3 +1,5 @@ +.. role:: switch(samp) + .. _Implementation_Defined_Pragmas: ****************************** @@ -32,7 +34,7 @@ Syntax: This pragma must appear at the start of the statement sequence of a -handled sequence of statements (right after the `begin`). It has +handled sequence of statements (right after the ``begin``). It has the effect of deferring aborts for the sequence of statements (but not for the declarations or handlers, if any, associated with this statement sequence). @@ -84,7 +86,7 @@ Syntax: ABSTRACT_STATE ::= name -For the semantics of this pragma, see the entry for aspect `Abstract_State` in +For the semantics of this pragma, see the entry for aspect ``Abstract_State`` in the SPARK 2014 Reference Manual, section 7.1.4. Pragma Ada_83 @@ -104,7 +106,7 @@ the syntax and semantics of Ada 83, as defined in the original Ada 83 Reference Manual as possible. In particular, the keywords added by Ada 95 and Ada 2005 are not recognized, optional package bodies are allowed, and generics may name types with unknown discriminants without using -the `(<>)` notation. In addition, some but not all of the additional +the ``(<>)`` notation. In addition, some but not all of the additional restrictions of Ada 83 are enforced. Ada 83 mode is intended for two purposes. Firstly, it allows existing @@ -127,7 +129,7 @@ Syntax: A configuration pragma that establishes Ada 95 mode for the unit to which it applies, regardless of the mode set by the command line switches. -This mode is set automatically for the `Ada` and `System` +This mode is set automatically for the ``Ada`` and ``System`` packages and their children, so you need not specify it in these contexts. This pragma is useful when writing a reusable component that itself uses Ada 95 features, but which is intended to be usable from @@ -187,7 +189,7 @@ Syntax: A configuration pragma that establishes Ada 2012 mode for the unit to which it applies, regardless of the mode set by the command line switches. -This mode is set automatically for the `Ada` and `System` +This mode is set automatically for the ``Ada`` and ``System`` packages and their children, so you need not specify it in these contexts. This pragma is useful when writing a reusable component that itself uses Ada 2012 features, but which is intended to be usable from @@ -227,15 +229,15 @@ Syntax: pragma Allow_Integer_Address; -In almost all versions of GNAT, `System.Address` is a private +In almost all versions of GNAT, ``System.Address`` is a private type in accordance with the implementation advice in the RM. This means that integer values, in particular integer literals, are not allowed as address values. If the configuration pragma -`Allow_Integer_Address` is given, then integer expressions may -be used anywhere a value of type `System.Address` is required. +``Allow_Integer_Address`` is given, then integer expressions may +be used anywhere a value of type ``System.Address`` is required. The effect is to introduce an implicit unchecked conversion from the -integer value to type `System.Address`. The reverse case of using +integer value to type ``System.Address``. The reverse case of using an address where an integer type is required is handled analogously. The following example compiles without errors: @@ -261,8 +263,8 @@ The following example compiles without errors: end AddrAsInt; -Note that pragma `Allow_Integer_Address` is ignored if `System.Address` -is not a private type. In implementations of `GNAT` where +Note that pragma ``Allow_Integer_Address`` is ignored if ``System.Address`` +is not a private type. In implementations of ``GNAT`` where System.Address is a visible integer type, this pragma serves no purpose but is ignored rather than rejected to allow common sets of sources to be used @@ -280,18 +282,18 @@ Syntax:: ARG ::= NAME | EXPRESSION -This pragma is used to annotate programs. `identifier` identifies +This pragma is used to annotate programs. IDENTIFIER identifies the type of annotation. GNAT verifies that it is an identifier, but does not otherwise analyze it. The second optional identifier is also left unanalyzed, and by convention is used to control the action of the tool to -which the annotation is addressed. The remaining `arg` arguments +which the annotation is addressed. The remaining ARG arguments can be either string literals or more generally expressions. String literals are assumed to be either of type -`Standard.String` or else `Wide_String` or `Wide_Wide_String` +``Standard.String`` or else ``Wide_String`` or ``Wide_Wide_String`` depending on the character literals they contain. All other kinds of arguments are analyzed as expressions, and must be unambiguous. The last argument if present must have the identifier -`Entity` and GNAT verifies that a local name is given. +``Entity`` and GNAT verifies that a local name is given. The analyzed pragma is retained in the tree, but not otherwise processed by any part of the GNAT compiler, except to generate corresponding note @@ -327,18 +329,18 @@ equivalent to the following: The string argument, if given, is the message that will be associated with the exception occurrence if the exception is raised. If no second -argument is given, the default message is `file`:`nnn`, -where `file` is the name of the source file containing the assert, -and `nnn` is the line number of the assert. +argument is given, the default message is ``file``:``nnn``, +where ``file`` is the name of the source file containing the assert, +and ``nnn`` is the line number of the assert. -Note that, as with the `if` statement to which it is equivalent, the -type of the expression is either `Standard.Boolean`, or any type derived +Note that, as with the ``if`` statement to which it is equivalent, the +type of the expression is either ``Standard.Boolean``, or any type derived from this standard type. Assert checks can be either checked or ignored. By default they are ignored. They will be checked if either the command line switch *-gnata* is -used, or if an `Assertion_Policy` or `Check_Policy` pragma is used -to enable `Assert_Checks`. +used, or if an ``Assertion_Policy`` or ``Check_Policy`` pragma is used +to enable ``Assert_Checks``. If assertions are ignored, then there is no run-time effect (and in particular, any side effects from the @@ -347,8 +349,8 @@ analyzed at compile time, and may cause types to be frozen if they are mentioned here for the first time). If assertions are checked, then the given expression is tested, and if -it is `False` then `System.Assertions.Raise_Assert_Failure` is called -which results in the raising of `Assert_Failure` with the given message. +it is ``False`` then ``System.Assertions.Raise_Assert_Failure`` is called +which results in the raising of ``Assert_Failure`` with the given message. You should generally avoid side effects in the expression arguments of this pragma, because these side effects will turn on and off with the @@ -357,8 +359,8 @@ effect on the program. However, the expressions are analyzed for semantic correctness whether or not assertions are enabled, so turning assertions on and off cannot affect the legality of a program. -Note that the implementation defined policy `DISABLE`, given in a -pragma `Assertion_Policy`, can be used to suppress this semantic analysis. +Note that the implementation defined policy ``DISABLE``, given in a +pragma ``Assertion_Policy``, can be used to suppress this semantic analysis. Note: this is a standard language-defined pragma in versions of Ada from 2005 on. In GNAT, it is implemented in all versions @@ -375,9 +377,9 @@ Syntax:: [, string_EXPRESSION]); -The effect of this pragma is identical to that of pragma `Assert`, -except that in an `Assertion_Policy` pragma, the identifier -`Assert_And_Cut` is used to control whether it is ignored or checked +The effect of this pragma is identical to that of pragma ``Assert``, +except that in an ``Assertion_Policy`` pragma, the identifier +``Assert_And_Cut`` is used to control whether it is ignored or checked (or disabled). The intention is that this be used within a subprogram when the @@ -432,42 +434,42 @@ Syntax:: This is a standard Ada 2012 pragma that is available as an implementation-defined pragma in earlier versions of Ada. -The assertion kinds `RM_ASSERTION_KIND` are those defined in -the Ada standard. The assertion kinds `ID_ASSERTION_KIND` +The assertion kinds ``RM_ASSERTION_KIND`` are those defined in +the Ada standard. The assertion kinds ``ID_ASSERTION_KIND`` are implementation defined additions recognized by the GNAT compiler. The pragma applies in both cases to pragmas and aspects with matching -names, e.g. `Pre` applies to the Pre aspect, and `Precondition` -applies to both the `Precondition` pragma -and the aspect `Precondition`. Note that the identifiers for +names, e.g. ``Pre`` applies to the Pre aspect, and ``Precondition`` +applies to both the ``Precondition`` pragma +and the aspect ``Precondition``. Note that the identifiers for pragmas Pre_Class and Post_Class are Pre'Class and Post'Class (not Pre_Class and Post_Class), since these pragmas are intended to be identical to the corresponding aspects). -If the policy is `CHECK`, then assertions are enabled, i.e. +If the policy is ``CHECK``, then assertions are enabled, i.e. the corresponding pragma or aspect is activated. -If the policy is `IGNORE`, then assertions are ignored, i.e. +If the policy is ``IGNORE``, then assertions are ignored, i.e. the corresponding pragma or aspect is deactivated. This pragma overrides the effect of the *-gnata* switch on the command line. -If the policy is `SUPPRESSIBLE`, then assertions are enabled by default, +If the policy is ``SUPPRESSIBLE``, then assertions are enabled by default, however, if the *-gnatp* switch is specified all assertions are ignored. -The implementation defined policy `DISABLE` is like -`IGNORE` except that it completely disables semantic +The implementation defined policy ``DISABLE`` is like +``IGNORE`` except that it completely disables semantic checking of the corresponding pragma or aspect. This is useful when the pragma or aspect argument references subprograms in a with'ed package which is replaced by a dummy package for the final build. -The implementation defined assertion kind `Assertions` applies to all +The implementation defined assertion kind ``Assertions`` applies to all assertion kinds. The form with no assertion kind given implies this choice, so it applies to all assertion kinds (RM defined, and implementation defined). -The implementation defined assertion kind `Statement_Assertions` -applies to `Assert`, `Assert_And_Cut`, -`Assume`, `Loop_Invariant`, and `Loop_Variant`. +The implementation defined assertion kind ``Statement_Assertions`` +applies to ``Assert``, ``Assert_And_Cut``, +``Assume``, ``Loop_Invariant``, and ``Loop_Variant``. Pragma Assume ============= @@ -481,9 +483,9 @@ Syntax: [, string_EXPRESSION]); -The effect of this pragma is identical to that of pragma `Assert`, -except that in an `Assertion_Policy` pragma, the identifier -`Assume` is used to control whether it is ignored or checked +The effect of this pragma is identical to that of pragma ``Assert``, +except that in an ``Assertion_Policy`` pragma, the identifier +``Assume`` is used to control whether it is ignored or checked (or disabled). The intention is that this be used for assumptions about the @@ -491,7 +493,7 @@ external environment. So you cannot expect to verify formally or informally that the condition is met, this must be established by examining things outside the program itself. For example, we may have code that depends on the size of -`Long_Long_Integer` being at least 64. So we could write: +``Long_Long_Integer`` being at least 64. So we could write: .. code-block:: ada @@ -537,12 +539,12 @@ prove they are valid. Consider the following example: if V1 and V2 have valid values, then the loop is known at compile time not to execute since the lower bound must be greater than the upper bound. However in default mode, no such assumption is made, -and the loop may execute. If `Assume_No_Invalid_Values (On)` +and the loop may execute. If ``Assume_No_Invalid_Values (On)`` is given, the compiler will assume that any occurrence of a variable -other than in an explicit `'Valid` test always has a valid +other than in an explicit ``'Valid`` test always has a valid value, and the loop above will be optimized away. -The use of `Assume_No_Invalid_Values (On)` is appropriate if +The use of ``Assume_No_Invalid_Values (On)`` is appropriate if you know your code is free of uninitialized variables and other possible sources of invalid representations, and may result in more efficient code. A program that accesses an invalid representation @@ -566,7 +568,7 @@ Syntax: pragma Asynch_Readers [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Async_Readers` in +For the semantics of this pragma, see the entry for aspect ``Async_Readers`` in the SPARK 2014 Reference Manual, section 7.1.2. .. _Pragma-Async_Writers: @@ -580,7 +582,7 @@ Syntax: pragma Asynch_Writers [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Async_Writers` in +For the semantics of this pragma, see the entry for aspect ``Async_Writers`` in the SPARK 2014 Reference Manual, section 7.1.2. Pragma Attribute_Definition @@ -596,7 +598,7 @@ Syntax: [Expression =>] EXPRESSION | NAME); -If `Attribute` is a known attribute name, this pragma is equivalent to +If ``Attribute`` is a known attribute name, this pragma is equivalent to the attribute definition clause: @@ -605,7 +607,7 @@ the attribute definition clause: for Entity'Attribute use Expression; -If `Attribute` is not a recognized attribute name, the pragma is +If ``Attribute`` is not a recognized attribute name, the pragma is ignored, and a warning is emitted. This allows source code to be written that takes advantage of some new attribute, while remaining compilable with earlier compilers. @@ -625,15 +627,15 @@ Syntax: Normally the default mechanism for passing C convention records to C convention subprograms is to pass them by reference, as suggested by RM -B.3(69). Use the configuration pragma `C_Pass_By_Copy` to change +B.3(69). Use the configuration pragma ``C_Pass_By_Copy`` to change this default, by requiring that record formal parameters be passed by copy if all of the following conditions are met: * The size of the record type does not exceed the value specified for - `Max_Size`. + ``Max_Size``. * - The record type has `Convention C`. + The record type has ``Convention C``. * The formal parameter has this record type, and the subprogram has a foreign (non-Ada) convention. @@ -643,8 +645,8 @@ manner consistent with what C expects if the corresponding formal in the C prototype is a struct (rather than a pointer to a struct). You can also pass records by copy by specifying the convention -`C_Pass_By_Copy` for the record type, or by using the extended -`Import` and `Export` pragmas, which allow specification of +``C_Pass_By_Copy`` for the record type, or by using the extended +``Import`` and ``Export`` pragmas, which allow specification of passing mechanisms on a parameter by parameter basis. Pragma Check @@ -670,19 +672,19 @@ Syntax: Invariant'Class -This pragma is similar to the predefined pragma `Assert` except that an +This pragma is similar to the predefined pragma ``Assert`` except that an extra identifier argument is present. In conjunction with pragma -`Check_Policy`, this can be used to define groups of assertions that can -be independently controlled. The identifier `Assertion` is special, it -refers to the normal set of pragma `Assert` statements. +``Check_Policy``, this can be used to define groups of assertions that can +be independently controlled. The identifier ``Assertion`` is special, it +refers to the normal set of pragma ``Assert`` statements. Checks introduced by this pragma are normally deactivated by default. They can be activated either by the command line option *-gnata*, which turns on -all checks, or individually controlled using pragma `Check_Policy`. +all checks, or individually controlled using pragma ``Check_Policy``. -The identifiers `Assertions` and `Statement_Assertions` are not +The identifiers ``Assertions`` and ``Statement_Assertions`` are not permitted as check kinds, since this would cause confusion with the use -of these identifiers in `Assertion_Policy` and `Check_Policy` +of these identifiers in ``Assertion_Policy`` and ``Check_Policy`` pragmas, where they are used to refer to sets of assertions. Pragma Check_Float_Overflow @@ -697,8 +699,8 @@ Syntax: pragma Check_Float_Overflow; -In Ada, the predefined floating-point types (`Short_Float`, -`Float`, `Long_Float`, `Long_Long_Float`) are +In Ada, the predefined floating-point types (``Short_Float``, +``Float``, ``Long_Float``, ``Long_Long_Float``) are defined to be *unconstrained*. This means that even though each has a well-defined base range, an operation that delivers a result outside this base range is not required to raise an exception. @@ -721,22 +723,22 @@ can have the same base range as its base type. For example: subtype My_Float is Float range Float'Range; -Here `My_Float` has the same range as -`Float` but is constrained, so operations on -`My_Float` values will be checked for overflow +Here ``My_Float`` has the same range as +``Float`` but is constrained, so operations on +``My_Float`` values will be checked for overflow against this range. This style will achieve the desired goal, but it is often more convenient to be able to simply use the standard predefined floating-point types as long as overflow checking could be guaranteed. -The `Check_Float_Overflow` +The ``Check_Float_Overflow`` configuration pragma achieves this effect. If a unit is compiled subject to this configuration pragma, then all operations on predefined floating-point types including operations on base types of these floating-point types will be treated as though those types were constrained, and overflow checks -will be generated. The `Constraint_Error` +will be generated. The ``Constraint_Error`` exception is raised if the result is out of range. This mode can also be set by use of the compiler @@ -764,14 +766,14 @@ are present in a partition mentioning the same name, only one new check name is introduced. An implementation defined check name introduced with this pragma may -be used in only three contexts: `pragma Suppress`, -`pragma Unsuppress`, -and as the prefix of a `Check_Name'Enabled` attribute reference. For +be used in only three contexts: ``pragma Suppress``, +``pragma Unsuppress``, +and as the prefix of a ``Check_Name'Enabled`` attribute reference. For any of these three cases, the check name must be visible. A check name is visible if it is in the configuration pragmas applying to the current unit, or if it appears at the start of any unit that is part of the dependency set of the current unit (e.g., units that -are mentioned in `with` clauses). +are mentioned in ``with`` clauses). Check names introduced by this pragma are subject to control by compiler switches (in particular -gnatp) in the usual manner. @@ -814,27 +816,27 @@ Syntax: This pragma is used to set the checking policy for assertions (specified -by aspects or pragmas), the `Debug` pragma, or additional checks -to be checked using the `Check` pragma. It may appear either as +by aspects or pragmas), the ``Debug`` pragma, or additional checks +to be checked using the ``Check`` pragma. It may appear either as a configuration pragma, or within a declarative part of package. In the latter case, it applies from the point where it appears to the end of -the declarative region (like pragma `Suppress`). +the declarative region (like pragma ``Suppress``). -The `Check_Policy` pragma is similar to the -predefined `Assertion_Policy` pragma, +The ``Check_Policy`` pragma is similar to the +predefined ``Assertion_Policy`` pragma, and if the check kind corresponds to one of the assertion kinds that -are allowed by `Assertion_Policy`, then the effect is identical. +are allowed by ``Assertion_Policy``, then the effect is identical. If the first argument is Debug, then the policy applies to Debug pragmas, -disabling their effect if the policy is `OFF`, `DISABLE`, or -`IGNORE`, and allowing them to execute with normal semantics if -the policy is `ON` or `CHECK`. In addition if the policy is -`DISABLE`, then the procedure call in `Debug` pragmas will +disabling their effect if the policy is ``OFF``, ``DISABLE``, or +``IGNORE``, and allowing them to execute with normal semantics if +the policy is ``ON`` or ``CHECK``. In addition if the policy is +``DISABLE``, then the procedure call in ``Debug`` pragmas will be totally ignored and not analyzed semantically. Finally the first argument may be some other identifier than the above possibilities, in which case it controls a set of named assertions -that can be checked using pragma `Check`. For example, if the pragma: +that can be checked using pragma ``Check``. For example, if the pragma: .. code-block:: ada @@ -842,19 +844,19 @@ that can be checked using pragma `Check`. For example, if the pragma: pragma Check_Policy (Critical_Error, OFF); -is given, then subsequent `Check` pragmas whose first argument is also -`Critical_Error` will be disabled. +is given, then subsequent ``Check`` pragmas whose first argument is also +``Critical_Error`` will be disabled. -The check policy is `OFF` to turn off corresponding checks, and `ON` +The check policy is ``OFF`` to turn off corresponding checks, and ``ON`` to turn on corresponding checks. The default for a set of checks for which no -`Check_Policy` is given is `OFF` unless the compiler switch +``Check_Policy`` is given is ``OFF`` unless the compiler switch *-gnata* is given, which turns on all checks by default. -The check policy settings `CHECK` and `IGNORE` are recognized -as synonyms for `ON` and `OFF`. These synonyms are provided for -compatibility with the standard `Assertion_Policy` pragma. The check -policy setting `DISABLE` causes the second argument of a corresponding -`Check` pragma to be completely ignored and not analyzed. +The check policy settings ``CHECK`` and ``IGNORE`` are recognized +as synonyms for ``ON`` and ``OFF``. These synonyms are provided for +compatibility with the standard ``Assertion_Policy`` pragma. The check +policy setting ``DISABLE`` causes the second argument of a corresponding +``Check`` pragma to be completely ignored and not analyzed. Pragma Comment ============== @@ -867,10 +869,10 @@ Syntax: pragma Comment (static_string_EXPRESSION); -This is almost identical in effect to pragma `Ident`. It allows the +This is almost identical in effect to pragma ``Ident``. It allows the placement of a comment into the object file and hence into the executable file if the operating system permits such usage. The -difference is that `Comment`, unlike `Ident`, has +difference is that ``Comment``, unlike ``Ident``, has no limitations on placement of the pragma (it can be placed anywhere in the main source unit), and if more than one pragma is used, all comments are retained. @@ -894,15 +896,15 @@ Syntax: This pragma enables the shared use of variables stored in overlaid -linker areas corresponding to the use of `COMMON` +linker areas corresponding to the use of ``COMMON`` in Fortran. The single -object `LOCAL_NAME` is assigned to the area designated by -the `External` argument. +object ``LOCAL_NAME`` is assigned to the area designated by +the ``External`` argument. You may define a record to correspond to a series -of fields. The `Size` argument +of fields. The ``Size`` argument is syntax checked in GNAT, but otherwise ignored. -`Common_Object` is not supported on all platforms. If no +``Common_Object`` is not supported on all platforms. If no support is available, then the code generator will issue a message indicating that the necessary attribute for implementation of this pragma is not available. @@ -1021,7 +1023,7 @@ Syntax: ([Entity =>] LOCAL_NAME); -The `Entity` argument must be the name of a record type which has +The ``Entity`` argument must be the name of a record type which has two fields of the same floating-point type. The effect of this pragma is to force gcc to use the special internal complex representation form for this record, which may be more efficient. Note that this may result in @@ -1053,7 +1055,7 @@ Syntax: Specifies the alignment of components in array or record types. -The meaning of the `Form` argument is as follows: +The meaning of the ``Form`` argument is as follows: .. index:: Component_Size (in pragma Component_Alignment) @@ -1079,25 +1081,25 @@ The meaning of the `Form` argument is as follows: *Storage_Unit* Specifies that array or record components are byte aligned, i.e., aligned on boundaries determined by the value of the constant - `System.Storage_Unit`. + ``System.Storage_Unit``. .. index:: Default (in pragma Component_Alignment) *Default* Specifies that array or record components are aligned on default boundaries, appropriate to the underlying hardware or operating system or - both. The `Default` choice is the same as `Component_Size` (natural + both. The ``Default`` choice is the same as ``Component_Size`` (natural alignment). -If the `Name` parameter is present, `type_LOCAL_NAME` must +If the ``Name`` parameter is present, ``type_LOCAL_NAME`` must refer to a local record or array type, and the specified alignment choice applies to the specified type. The use of -`Component_Alignment` together with a pragma `Pack` causes the -`Component_Alignment` pragma to be ignored. The use of -`Component_Alignment` together with a record representation clause +``Component_Alignment`` together with a pragma ``Pack`` causes the +``Component_Alignment`` pragma to be ignored. The use of +``Component_Alignment`` together with a record representation clause is only effective for fields not specified by the representation clause. -If the `Name` parameter is absent, the pragma can be used as either +If the ``Name`` parameter is absent, the pragma can be used as either a configuration pragma, in which case it applies to one or more units in accordance with the normal rules for configuration pragmas, or it can be used within a declarative part, in which case it applies to types that @@ -1107,7 +1109,7 @@ to be applied to any record or array type which has otherwise standard representation. If the alignment for a record or array type is not specified (using -pragma `Pack`, pragma `Component_Alignment`, or a record rep +pragma ``Pack``, pragma ``Component_Alignment``, or a record rep clause), the GNAT uses the default alignment as described previously. .. _Pragma-Constant_After_Elaboration: @@ -1122,7 +1124,7 @@ Syntax: pragma Constant_After_Elaboration [ (boolean_EXPRESSION) ]; For the semantics of this pragma, see the entry for aspect -`Constant_After_Elaboration` in the SPARK 2014 Reference Manual, section 3.3.1. +``Constant_After_Elaboration`` in the SPARK 2014 Reference Manual, section 3.3.1. .. _Pragma-Contract_Cases: @@ -1142,9 +1144,9 @@ Syntax: CONSEQUENCE ::= boolean_EXPRESSION -The `Contract_Cases` pragma allows defining fine-grain specifications +The ``Contract_Cases`` pragma allows defining fine-grain specifications that can complement or replace the contract given by a precondition and a -postcondition. Additionally, the `Contract_Cases` pragma can be used +postcondition. Additionally, the ``Contract_Cases`` pragma can be used by testing and formal verification tools. The compiler checks its validity and, depending on the assertion policy at the point of declaration of the pragma, it may insert a check in the executable. For code generation, the contract @@ -1176,7 +1178,7 @@ The postcondition ensures that for the condition that was True on entry, the corrresponding consequence is True on exit. Other consequence expressions are not evaluated. -A precondition `P` and postcondition `Q` can also be +A precondition ``P`` and postcondition ``Q`` can also be expressed as contract cases: .. code-block:: ada @@ -1184,16 +1186,16 @@ expressed as contract cases: pragma Contract_Cases (P => Q); -The placement and visibility rules for `Contract_Cases` pragmas are +The placement and visibility rules for ``Contract_Cases`` pragmas are identical to those described for preconditions and postconditions. The compiler checks that boolean expressions given in conditions and consequences are valid, where the rules for conditions are the same as -the rule for an expression in `Precondition` and the rules for +the rule for an expression in ``Precondition`` and the rules for consequences are the same as the rule for an expression in -`Postcondition`. In particular, attributes `'Old` and -`'Result` can only be used within consequence expressions. -The condition for the last contract case may be `others`, to denote +``Postcondition``. In particular, attributes ``'Old`` and +``'Result`` can only be used within consequence expressions. +The condition for the last contract case may be ``others``, to denote any case not captured by the previous cases. The following is an example of use within a package spec: @@ -1230,9 +1232,9 @@ Syntax: This pragma provides a mechanism for supplying synonyms for existing -convention identifiers. The `Name` identifier can subsequently +convention identifiers. The ``Name`` identifier can subsequently be used as a synonym for the given convention in other pragmas (including -for example pragma `Import` or another `Convention_Identifier` +for example pragma ``Import`` or another ``Convention_Identifier`` pragma). As an example of the use of this, suppose you had legacy code which used Fortran77 as the identifier for Fortran. Then the pragma: @@ -1242,13 +1244,13 @@ which used Fortran77 as the identifier for Fortran. Then the pragma: pragma Convention_Identifier (Fortran77, Fortran); -would allow the use of the convention identifier `Fortran77` in +would allow the use of the convention identifier ``Fortran77`` in subsequent code, avoiding the need to modify the sources. As another example, you could use this to parameterize convention requirements -according to systems. Suppose you needed to use `Stdcall` on -windows systems, and `C` on some other system, then you could -define a convention identifier `Library` and use a single -`Convention_Identifier` pragma to specify which convention +according to systems. Suppose you needed to use ``Stdcall`` on +windows systems, and ``C`` on some other system, then you could +define a convention identifier ``Library`` and use a single +``Convention_Identifier`` pragma to specify which convention would be used system-wide. Pragma CPP_Class @@ -1269,18 +1271,18 @@ externally declared C++ class type, and is to be laid out the same way that C++ would lay out the type. If the C++ class has virtual primitives then the record must be declared as a tagged record type. -Types for which `CPP_Class` is specified do not have assignment or +Types for which ``CPP_Class`` is specified do not have assignment or equality operators defined (such operations can be imported or declared as subprograms as required). Initialization is allowed only by constructor -functions (see pragma `CPP_Constructor`). Such types are implicitly +functions (see pragma ``CPP_Constructor``). Such types are implicitly limited if not explicitly declared as limited or derived from a limited type, and an error is issued in that case. See :ref:`Interfacing_to_C++` for related information. -Note: Pragma `CPP_Class` is currently obsolete. It is supported +Note: Pragma ``CPP_Class`` is currently obsolete. It is supported for backward compatibility but its functionality is available -using pragma `Import` with `Convention` = `CPP`. +using pragma ``Import`` with ``Convention`` = ``CPP``. Pragma CPP_Constructor ====================== @@ -1298,37 +1300,37 @@ Syntax: This pragma identifies an imported function (imported in the usual way -with pragma `Import`) as corresponding to a C++ constructor. If -`External_Name` and `Link_Name` are not specified then the -`Entity` argument is a name that must have been previously mentioned -in a pragma `Import` with `Convention` = `CPP`. Such name +with pragma ``Import``) as corresponding to a C++ constructor. If +``External_Name`` and ``Link_Name`` are not specified then the +``Entity`` argument is a name that must have been previously mentioned +in a pragma ``Import`` with ``Convention`` = ``CPP``. Such name must be of one of the following forms: * - **function** `Fname` **return** T` + **function** ``Fname`` **return** T` * - **function** `Fname` **return** T'Class + **function** ``Fname`` **return** T'Class * - **function** `Fname` (...) **return** T` + **function** ``Fname`` (...) **return** T` * - **function** `Fname` (...) **return** T'Class + **function** ``Fname`` (...) **return** T'Class -where `T` is a limited record type imported from C++ with pragma -`Import` and `Convention` = `CPP`. +where ``T`` is a limited record type imported from C++ with pragma +``Import`` and ``Convention`` = ``CPP``. The first two forms import the default constructor, used when an object -of type `T` is created on the Ada side with no explicit constructor. +of type ``T`` is created on the Ada side with no explicit constructor. The latter two forms cover all the non-default constructors of the type. See the GNAT User's Guide for details. If no constructors are imported, it is impossible to create any objects on the Ada side and the type is implicitly declared abstract. -Pragma `CPP_Constructor` is intended primarily for automatic generation -using an automatic binding generator tool (such as the `-fdump-ada-spec` +Pragma ``CPP_Constructor`` is intended primarily for automatic generation +using an automatic binding generator tool (such as the :switch:`-fdump-ada-spec` GCC switch). See :ref:`Interfacing_to_C++` for more related information. @@ -1407,7 +1409,7 @@ Syntax: pragma Default_Initial_Condition [ (null | boolean_EXPRESSION) ]; For the semantics of this pragma, see the entry for aspect -`Default_Initial_Condition` in the SPARK 2014 Reference Manual, section 7.3.3. +``Default_Initial_Condition`` in the SPARK 2014 Reference Manual, section 7.3.3. Pragma Debug ============ @@ -1431,11 +1433,11 @@ If debug pragmas are not enabled or if the condition is present and evaluates to False, this pragma has no effect. If debug pragmas are enabled, the semantics of the pragma is exactly equivalent to the procedure call statement corresponding to the argument with a terminating semicolon. Pragmas are -permitted in sequences of declarations, so you can use pragma `Debug` to +permitted in sequences of declarations, so you can use pragma ``Debug`` to intersperse calls to debug procedures in the middle of declarations. Debug pragmas can be enabled either by use of the command line switch *-gnata* -or by use of the pragma `Check_Policy` with a first argument of -`Debug`. +or by use of the pragma ``Check_Policy`` with a first argument of +``Debug``. Pragma Debug_Policy =================== @@ -1448,8 +1450,8 @@ Syntax: pragma Debug_Policy (CHECK | DISABLE | IGNORE | ON | OFF); -This pragma is equivalent to a corresponding `Check_Policy` pragma -with a first argument of `Debug`. It is retained for historical +This pragma is equivalent to a corresponding ``Check_Policy`` pragma +with a first argument of ``Debug``. It is retained for historical compatibility reasons. Pragma Default_Scalar_Storage_Order @@ -1467,7 +1469,7 @@ Syntax: pragma Default_Scalar_Storage_Order (High_Order_First | Low_Order_First); -Normally if no explicit `Scalar_Storage_Order` is given for a record +Normally if no explicit ``Scalar_Storage_Order`` is given for a record type or array type, then the scalar storage order defaults to the ordinary default for the target. But this default may be overridden using this pragma. The pragma may appear as a configuration pragma, or locally within a package @@ -1513,10 +1515,10 @@ The following example shows the use of this pragma: end DSSO1; -In this example record types L.. have `Low_Order_First` scalar -storage order, and record types H.. have `High_Order_First`. -Note that in the case of `H4a`, the order is not inherited -from the parent type. Only an explicitly set `Scalar_Storage_Order` +In this example record types with names starting with *L* have `Low_Order_First` scalar +storage order, and record types with names starting with *H* have ``High_Order_First``. +Note that in the case of ``H4a``, the order is not inherited +from the parent type. Only an explicitly set ``Scalar_Storage_Order`` gets inherited on type derivation. If this pragma is used as a configuration pragma which appears within a @@ -1574,7 +1576,7 @@ Syntax: where FUNCTION_RESULT is a function Result attribute_reference -For the semantics of this pragma, see the entry for aspect `Depends` in the +For the semantics of this pragma, see the entry for aspect ``Depends`` in the SPARK 2014 Reference Manual, section 6.1.5. Pragma Detect_Blocking @@ -1614,9 +1616,9 @@ be turned off using this pragma in cases where it is known not to be required. The placement and scope rules for this pragma are the same as those -for `pragma Suppress`. In particular it can be used as a +for ``pragma Suppress``. In particular it can be used as a configuration pragma, or in a declaration sequence where it applies -till the end of the scope. If an `Entity` argument is present, +till the end of the scope. If an ``Entity`` argument is present, the action applies only to that entity. Pragma Dispatching_Domain @@ -1645,7 +1647,7 @@ Syntax: pragma Effective_Reads [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Effective_Reads` in +For the semantics of this pragma, see the entry for aspect ``Effective_Reads`` in the SPARK 2014 Reference Manual, section 7.1.2. .. _Pragma-Effective_Writes: @@ -1659,7 +1661,7 @@ Syntax: pragma Effective_Writes [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Effective_Writes` +For the semantics of this pragma, see the entry for aspect ``Effective_Writes`` in the SPARK 2014 Reference Manual, section 7.1.2. Pragma Elaboration_Checks @@ -1677,16 +1679,17 @@ Syntax: This is a configuration pragma that provides control over the elaboration model used by the compilation affected by the -pragma. If the parameter is `Dynamic`, +pragma. If the parameter is ``Dynamic``, then the dynamic elaboration model described in the Ada Reference Manual is used, as though the *-gnatE* switch had been specified on the command -line. If the parameter is `Static`, then the default GNAT static +line. If the parameter is ``Static``, then the default GNAT static model is used. This configuration pragma overrides the setting of the command line. For full details on the elaboration models used by the GNAT compiler, see the chapter on elaboration order handling in the *GNAT User's Guide*. + Pragma Eliminate ================ .. index:: Elimination of unused subprograms @@ -1697,76 +1700,141 @@ Syntax: :: - pragma Eliminate ([Entity =>] DEFINING_DESIGNATOR, - [Source_Location =>] STRING_LITERAL); + pragma Eliminate ( + [ Unit_Name => ] IDENTIFIER | SELECTED_COMPONENT , + [ Entity => ] IDENTIFIER | + SELECTED_COMPONENT | + STRING_LITERAL + [, Source_Location => SOURCE_TRACE ] ); + SOURCE_TRACE ::= STRING_LITERAL -The string literal given for the source location is a string which -specifies the line number of the occurrence of the entity, using -the syntax for SOURCE_TRACE given below: +This pragma indicates that the given entity is not used in the program to be +compiled and built, thus allowing the compiler to +eliminate the code or data associated with the named entity. Any reference to +an eliminated entity causes a compile-time or link-time error. -:: +The pragma has the following semantics, where ``U`` is the unit specified by +the ``Unit_Name`` argument and ``E`` is the entity specified by the ``Entity`` +argument: - SOURCE_TRACE ::= SOURCE_REFERENCE [LBRACKET SOURCE_TRACE RBRACKET] +* ``E`` must be a subprogram that is explicitly declared either: - LBRACKET ::= [ - RBRACKET ::= ] + o Within ``U``, or - SOURCE_REFERENCE ::= FILE_NAME : LINE_NUMBER + o Within a generic package that is instantiated in ``U``, or - LINE_NUMBER ::= DIGIT {DIGIT} + o As an instance of generic subprogram instantiated in ``U``. + Otherwise the pragma is ignored. -Spaces around the colon in a `Source_Reference` are optional. - -The `DEFINING_DESIGNATOR` matches the defining designator used in an -explicit subprogram declaration, where the `entity` name in this -designator appears on the source line specified by the source location. - -The source trace that is given as the `Source_Location` shall obey the -following rules. The `FILE_NAME` is the short name (with no directory -information) of an Ada source file, given using exactly the required syntax -for the underlying file system (e.g. case is important if the underlying -operating system is case sensitive). `LINE_NUMBER` gives the line -number of the occurrence of the `entity` -as a decimal literal without an exponent or point. If an `entity` is not -declared in a generic instantiation (this includes generic subprogram -instances), the source trace includes only one source reference. If an entity -is declared inside a generic instantiation, its source trace (when parsing -from left to right) starts with the source location of the declaration of the -entity in the generic unit and ends with the source location of the -instantiation (it is given in square brackets). This approach is recursively -used in case of nested instantiations: the rightmost (nested most deeply in -square brackets) element of the source trace is the location of the outermost -instantiation, the next to left element is the location of the next (first -nested) instantiation in the code of the corresponding generic unit, and so -on, and the leftmost element (that is out of any square brackets) is the -location of the declaration of the entity to eliminate in a generic unit. - -Note that the `Source_Location` argument specifies which of a set of -similarly named entities is being eliminated, dealing both with overloading, -and also appearance of the same entity name in different scopes. +* If ``E`` is overloaded within ``U`` then, in the absence of a + ``Source_Location`` argument, all overloadings are eliminated. -This pragma indicates that the given entity is not used in the program to be -compiled and built. The effect of the pragma is to allow the compiler to -eliminate the code or data associated with the named entity. Any reference to -an eliminated entity causes a compile-time or link-time error. +* If ``E`` is overloaded within ``U`` and only some overloadings + are to be eliminated, then each overloading to be eliminated + must be specified in a corresponding pragma ``Eliminate`` + with a ``Source_Location`` argument identifying the line where the + declaration appears, as described below. + +* If ``E`` is declared as the result of a generic instantiation, then + a ``Source_Location`` argument is needed, as described below -The intention of pragma `Eliminate` is to allow a program to be compiled -in a system-independent manner, with unused entities eliminated, without +Pragma ``Eliminate`` allows a program to be compiled in a system-independent +manner, so that unused entities are eliminated but without needing to modify the source text. Normally the required set of -`Eliminate` pragmas is constructed automatically using the gnatelim tool. +``Eliminate`` pragmas is constructed automatically using the ``gnatelim`` tool. Any source file change that removes, splits, or -adds lines may make the set of Eliminate pragmas invalid because their -`Source_Location` argument values may get out of date. +adds lines may make the set of ``Eliminate`` pragmas invalid because their +``Source_Location`` argument values may get out of date. -Pragma `Eliminate` may be used where the referenced entity is a dispatching +Pragma ``Eliminate`` may be used where the referenced entity is a dispatching operation. In this case all the subprograms to which the given operation can dispatch are considered to be unused (are never called as a result of a direct or a dispatching call). +The string literal given for the source location specifies the line number +of the declaration of the entity, using the following syntax for ``SOURCE_TRACE``: + +:: + + SOURCE_TRACE ::= SOURCE_REFERENCE [ LBRACKET SOURCE_TRACE RBRACKET ] + + LBRACKET ::= '[' + RBRACKET ::= ']' + + SOURCE_REFERENCE ::= FILE_NAME : LINE_NUMBER + + LINE_NUMBER ::= DIGIT {DIGIT} + + +Spaces around the colon in a ``SOURCE_REFERENCE`` are optional. + +The source trace that is given as the ``Source_Location`` must obey the +following rules (or else the pragma is ignored), where ``U`` is +the unit ``U`` specified by the ``Unit_Name`` argument and ``E`` is the +subprogram specified by the ``Entity`` argument: + +* ``FILE_NAME`` is the short name (with no directory + information) of the Ada source file for ``U``, using the required syntax + for the underlying file system (e.g. case is significant if the underlying + operating system is case sensitive). + If ``U`` is a package and ``E`` is a subprogram declared in the package + specification and its full declaration appears in the package body, + then the relevant source file is the one for the package specification; + analogously if ``U`` is a generic package. + +* If ``E`` is not declared in a generic instantiation (this includes + generic subprogram instances), the source trace includes only one source + line reference. ``LINE_NUMBER`` gives the line number of the occurrence + of the declaration of ``E`` within the source file (as a decimal literal + without an exponent or point). + +* If ``E`` is declared by a generic instantiation, its source trace + (from left to right) starts with the source location of the + declaration of ``E`` in the generic unit and ends with the source + location of the instantiation, given in square brackets. This approach is + applied recursively with nested instantiations: the rightmost (nested + most deeply in square brackets) element of the source trace is the location + of the outermost instantiation, and the leftmost element (that is, outside + of any square brackets) is the location of the declaration of ``E`` in + the generic unit. + +Examples: + + .. code-block:: ada + + pragma Eliminate (Pkg0, Proc); + -- Eliminate (all overloadings of) Proc in Pkg0 + + pragma Eliminate (Pkg1, Proc, + Source_Location => "pkg1.ads:8"); + -- Eliminate overloading of Proc at line 8 in pkg1.ads + + -- Assume the following file contents: + -- gen_pkg.ads + -- 1: generic + -- 2: type T is private; + -- 3: package Gen_Pkg is + -- 4: procedure Proc(N : T); + -- ... ... + -- ... end Gen_Pkg; + -- + -- q.adb + -- 1: with Gen_Pkg; + -- 2: procedure Q is + -- 3: package Inst_Pkg is new Gen_Pkg(Integer); + -- ... -- No calls on Inst_Pkg.Proc + -- ... end Q; + + -- The following pragma eliminates Inst_Pkg.Proc from Q + pragma Eliminate (Q, Proc, + Source_Location => "gen_pkg.ads:4[q.adb:3]"); + + + Pragma Enable_Atomic_Synchronization ==================================== .. index:: Atomic Synchronization @@ -1785,14 +1853,14 @@ regarded as synchronization points in the case of multiple tasks. Particularly in the case of multi-processors this may require special handling, e.g. the generation of memory barriers. This synchronization is performed by default, but can be turned off using -`pragma Disable_Atomic_Synchronization`. The -`Enable_Atomic_Synchronization` pragma can be used to turn +``pragma Disable_Atomic_Synchronization``. The +``Enable_Atomic_Synchronization`` pragma can be used to turn it back on. The placement and scope rules for this pragma are the same as those -for `pragma Unsuppress`. In particular it can be used as a +for ``pragma Unsuppress``. In particular it can be used as a configuration pragma, or in a declaration sequence where it applies -till the end of the scope. If an `Entity` argument is present, +till the end of the scope. If an ``Entity`` argument is present, the action applies only to that entity. Pragma Export_Function @@ -1840,24 +1908,24 @@ Use this pragma to make a function externally callable and optionally provide information on mechanisms to be used for passing parameter and result values. We recommend, for the purposes of improving portability, this pragma always be used in conjunction with a separate pragma -`Export`, which must precede the pragma `Export_Function`. -GNAT does not require a separate pragma `Export`, but if none is -present, `Convention Ada` is assumed, which is usually +``Export``, which must precede the pragma ``Export_Function``. +GNAT does not require a separate pragma ``Export``, but if none is +present, ``Convention Ada`` is assumed, which is usually not what is wanted, so it is usually appropriate to use this -pragma in conjunction with a `Export` or `Convention` +pragma in conjunction with a ``Export`` or ``Convention`` pragma that specifies the desired foreign convention. -Pragma `Export_Function` -(and `Export`, if present) must appear in the same declarative +Pragma ``Export_Function`` +(and ``Export``, if present) must appear in the same declarative region as the function to which they apply. -`internal_name` must uniquely designate the function to which the +The ``internal_name`` must uniquely designate the function to which the pragma applies. If more than one function name exists of this name in -the declarative part you must use the `Parameter_Types` and -`Result_Type` parameters is mandatory to achieve the required -unique designation. `subtype_mark`s in these parameters must +the declarative part you must use the ``Parameter_Types`` and +``Result_Type`` parameters to achieve the required +unique designation. The `subtype_mark`\ s in these parameters must exactly match the subtypes in the corresponding function specification, using positional notation to match parameters with subtype marks. -The form with an `'Access` attribute can be used to match an +The form with an ``'Access`` attribute can be used to match an anonymous access parameter. .. index:: Suppressing external name @@ -1887,9 +1955,9 @@ Syntax: This pragma designates an object as exported, and apart from the extended rules for external symbols, is identical in effect to the use of -the normal `Export` pragma applied to an object. You may use a +the normal ``Export`` pragma applied to an object. You may use a separate Export pragma (and you probably should from the point of view -of portability), but it is not required. `Size` is syntax checked, +of portability), but it is not required. ``Size`` is syntax checked, but otherwise ignored by GNAT. Pragma Export_Procedure @@ -1929,13 +1997,13 @@ Syntax: MECHANISM_NAME ::= Value | Reference -This pragma is identical to `Export_Function` except that it +This pragma is identical to ``Export_Function`` except that it applies to a procedure rather than a function and the parameters -`Result_Type` and `Result_Mechanism` are not permitted. -GNAT does not require a separate pragma `Export`, but if none is -present, `Convention Ada` is assumed, which is usually +``Result_Type`` and ``Result_Mechanism`` are not permitted. +GNAT does not require a separate pragma ``Export``, but if none is +present, ``Convention Ada`` is assumed, which is usually not what is wanted, so it is usually appropriate to use this -pragma in conjunction with a `Export` or `Convention` +pragma in conjunction with a ``Export`` or ``Convention`` pragma that specifies the desired foreign convention. .. index:: Suppressing external name @@ -2003,18 +2071,18 @@ Syntax: MECHANISM_NAME ::= Value | Reference -This pragma is identical to `Export_Procedure` except that the -first parameter of `LOCAL_NAME`, which must be present, must be of -mode `OUT`, and externally the subprogram is treated as a function +This pragma is identical to ``Export_Procedure`` except that the +first parameter of ``LOCAL_NAME``, which must be present, must be of +mode ``out``, and externally the subprogram is treated as a function with this parameter as the result of the function. GNAT provides for -this capability to allow the use of `OUT` and `IN OUT` +this capability to allow the use of ``out`` and ``in out`` parameters in interfacing to external functions (which are not permitted in Ada functions). -GNAT does not require a separate pragma `Export`, but if none is -present, `Convention Ada` is assumed, which is almost certainly +GNAT does not require a separate pragma ``Export``, but if none is +present, ``Convention Ada`` is assumed, which is almost certainly not what is wanted since the whole point of this pragma is to interface with foreign language functions, so it is usually appropriate to use this -pragma in conjunction with a `Export` or `Convention` +pragma in conjunction with a ``Export`` or ``Convention`` pragma that specifies the desired foreign convention. .. index:: Suppressing external name @@ -2040,35 +2108,35 @@ Syntax: This pragma is used to provide backwards compatibility with other -implementations that extend the facilities of package `System`. In -GNAT, `System` contains only the definitions that are present in +implementations that extend the facilities of package ``System``. In +GNAT, ``System`` contains only the definitions that are present in the Ada RM. However, other implementations, notably the DEC Ada 83 -implementation, provide many extensions to package `System`. +implementation, provide many extensions to package ``System``. For each such implementation accommodated by this pragma, GNAT provides a -package `Aux_`xxx``, e.g., `Aux_DEC` for the DEC Ada 83 +package :samp:`Aux_{xxx}`, e.g., ``Aux_DEC`` for the DEC Ada 83 implementation, which provides the required additional definitions. You -can use this package in two ways. You can `with` it in the normal -way and access entities either by selection or using a `use` +can use this package in two ways. You can ``with`` it in the normal +way and access entities either by selection or using a ``use`` clause. In this case no special processing is required. However, if existing code contains references such as -`System.`xxx`` where `xxx` is an entity in the extended -definitions provided in package `System`, you may use this pragma -to extend visibility in `System` in a non-standard way that +:samp:`System.{xxx}` where *xxx* is an entity in the extended +definitions provided in package ``System``, you may use this pragma +to extend visibility in ``System`` in a non-standard way that provides greater compatibility with the existing code. Pragma -`Extend_System` is a configuration pragma whose single argument is +``Extend_System`` is a configuration pragma whose single argument is the name of the package containing the extended definition -(e.g., `Aux_DEC` for the DEC Ada case). A unit compiled under +(e.g., ``Aux_DEC`` for the DEC Ada case). A unit compiled under control of this pragma will be processed using special visibility -processing that looks in package `System.Aux_`xxx`` where -`Aux_`xxx`` is the pragma argument for any entity referenced in -package `System`, but not found in package `System`. +processing that looks in package :samp:`System.Aux_{xxx}` where +:samp:`Aux_{xxx}` is the pragma argument for any entity referenced in +package ``System``, but not found in package ``System``. -You can use this pragma either to access a predefined `System` -extension supplied with the compiler, for example `Aux_DEC` or +You can use this pragma either to access a predefined ``System`` +extension supplied with the compiler, for example ``Aux_DEC`` or you can construct your own extension unit following the above -definition. Note that such a package is a child of `System` +definition. Note that such a package is a child of ``System`` and thus is considered part of the implementation. To compile it you will have to use the *-gnatg* switch for compiling System units, as explained in the @@ -2099,7 +2167,7 @@ of GNAT specific extensions are recognized as follows: *Constrained attribute for generic objects* - The `Constrained` attribute is permitted for objects of + The ``Constrained`` attribute is permitted for objects of generic types. The result indicates if the corresponding actual is constrained. @@ -2114,7 +2182,7 @@ Syntax: pragma Extensions_Visible [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Extensions_Visible` +For the semantics of this pragma, see the entry for aspect ``Extensions_Visible`` in the SPARK 2014 Reference Manual, section 6.1.7. Pragma External @@ -2133,10 +2201,10 @@ Syntax: This pragma is identical in syntax and semantics to pragma -`Export` as defined in the Ada Reference Manual. It is +``Export`` as defined in the Ada Reference Manual. It is provided for compatibility with some Ada 83 compilers that used this pragma for exactly the same purposes as pragma -`Export` before the latter was standardized. +``Export`` before the latter was standardized. Pragma External_Name_Casing =========================== @@ -2177,9 +2245,9 @@ with Import and Export pragmas. There are two cases to consider: casing of the external name, and so a convention is needed. In GNAT the default treatment is that such names are converted to all lower case letters. This corresponds to the normal C style in many environments. - The first argument of pragma `External_Name_Casing` can be used to - control this treatment. If `Uppercase` is specified, then the name - will be forced to all uppercase letters. If `Lowercase` is specified, + The first argument of pragma ``External_Name_Casing`` can be used to + control this treatment. If ``Uppercase`` is specified, then the name + will be forced to all uppercase letters. If ``Lowercase`` is specified, then the normal default of all lower case letters will be used. This same implicit treatment is also used in the case of extended DEC Ada 83 @@ -2199,11 +2267,11 @@ with Import and Export pragmas. There are two cases to consider: In this case, the string literal normally provides the exact casing required for the external name. The second argument of pragma - `External_Name_Casing` may be used to modify this behavior. - If `Uppercase` is specified, then the name - will be forced to all uppercase letters. If `Lowercase` is specified, + ``External_Name_Casing`` may be used to modify this behavior. + If ``Uppercase`` is specified, then the name + will be forced to all uppercase letters. If ``Lowercase`` is specified, then the name will be forced to all lowercase letters. A specification of - `As_Is` provides the normal default behavior in which the casing is + ``As_Is`` provides the normal default behavior in which the casing is taken from the string provided. This pragma may appear anywhere that a pragma is valid. In particular, it @@ -2247,7 +2315,7 @@ following operations are affected: overflows for numbers near the end of the range. The Ada standard requires that this situation be detected and corrected by scaling, but in Fast_Math mode such cases will simply result in overflow. Note that to take advantage of this you - must instantiate your own version of `Ada.Numerics.Generic_Complex_Types` + must instantiate your own version of ``Ada.Numerics.Generic_Complex_Types`` under control of the pragma, rather than use the preinstantiated versions. .. _Pragma-Favor_Top_Level: @@ -2263,13 +2331,13 @@ Syntax: pragma Favor_Top_Level (type_NAME); -The argument of pragma `Favor_Top_Level` must be a named access-to-subprogram +The argument of pragma ``Favor_Top_Level`` must be a named access-to-subprogram type. This pragma is an efficiency hint to the compiler, regarding the use of -`'Access` or `'Unrestricted_Access` on nested (non-library-level) subprograms. +``'Access`` or ``'Unrestricted_Access`` on nested (non-library-level) subprograms. The pragma means that nested subprograms are not used with this type, or are rare, so that the generated code should be efficient in the top-level case. When this pragma is used, dynamically generated trampolines may be used on some -targets for nested subprograms. See restriction `No_Implicit_Dynamic_Code`. +targets for nested subprograms. See restriction ``No_Implicit_Dynamic_Code``. Pragma Finalize_Storage_Only ============================ @@ -2282,14 +2350,14 @@ Syntax: pragma Finalize_Storage_Only (first_subtype_LOCAL_NAME); -The argument of pragma `Finalize_Storage_Only` must denote a local type which -is derived from `Ada.Finalization.Controlled` or `Limited_Controlled`. The -pragma suppresses the call to `Finalize` for declared library-level objects +The argument of pragma ``Finalize_Storage_Only`` must denote a local type which +is derived from ``Ada.Finalization.Controlled`` or ``Limited_Controlled``. The +pragma suppresses the call to ``Finalize`` for declared library-level objects of the argument type. This is mostly useful for types where finalization is only used to deal with storage reclamation since in most environments it is not necessary to reclaim memory just before terminating execution, hence the name. Note that this pragma does not suppress Finalize calls for library-level -heap-allocated objects (see pragma `No_Heap_Finalization`). +heap-allocated objects (see pragma ``No_Heap_Finalization``). Pragma Float_Representation =========================== @@ -2303,12 +2371,12 @@ Syntax:: In the one argument form, this pragma is a configuration pragma which allows control over the internal representation chosen for the predefined -floating point types declared in the packages `Standard` and -`System`. This pragma is only provided for compatibility and has no effect. +floating point types declared in the packages ``Standard`` and +``System``. This pragma is only provided for compatibility and has no effect. The two argument form specifies the representation to be used for the specified floating-point type. The argument must -be `IEEE_Float` to specify the use of IEEE format, as follows: +be ``IEEE_Float`` to specify the use of IEEE format, as follows: * For a digits value of 6, 32-bit IEEE short format will be used. @@ -2328,7 +2396,7 @@ Syntax: pragma Ghost [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Ghost` in the SPARK +For the semantics of this pragma, see the entry for aspect ``Ghost`` in the SPARK 2014 Reference Manual, section 6.9. .. _Pragma-Global: @@ -2353,7 +2421,7 @@ Syntax: GLOBAL_LIST ::= GLOBAL_ITEM | (GLOBAL_ITEM {, GLOBAL_ITEM}) GLOBAL_ITEM ::= NAME -For the semantics of this pragma, see the entry for aspect `Global` in the +For the semantics of this pragma, see the entry for aspect ``Global`` in the SPARK 2014 Reference Manual, section 6.1.4. Pragma Ident @@ -2367,7 +2435,7 @@ Syntax: pragma Ident (static_string_EXPRESSION); -This pragma is identical in effect to pragma `Comment`. It is provided +This pragma is identical in effect to pragma ``Comment``. It is provided for compatibility with other Ada compilers providing this pragma. Pragma Ignore_Pragma @@ -2385,8 +2453,8 @@ that takes a single argument that is a simple identifier. Any subsequent use of a pragma whose pragma identifier matches this argument will be silently ignored. This may be useful when legacy code or code intended for compilation with some other compiler contains pragmas that match the -name, but not the exact implementation, of a `GNAT` pragma. The use of this -pragma allows such pragmas to be ignored, which may be useful in `CodePeer` +name, but not the exact implementation, of a GNAT pragma. The use of this +pragma allows such pragmas to be ignored, which may be useful in CodePeer mode, or during porting of legacy code. Pragma Implementation_Defined @@ -2563,24 +2631,24 @@ Syntax: | Reference -This pragma is used in conjunction with a pragma `Import` to +This pragma is used in conjunction with a pragma ``Import`` to specify additional information for an imported function. The pragma -`Import` (or equivalent pragma `Interface`) must precede the -`Import_Function` pragma and both must appear in the same +``Import`` (or equivalent pragma ``Interface``) must precede the +``Import_Function`` pragma and both must appear in the same declarative part as the function specification. -The `Internal` argument must uniquely designate +The ``Internal`` argument must uniquely designate the function to which the pragma applies. If more than one function name exists of this name in -the declarative part you must use the `Parameter_Types` and -`Result_Type` parameters to achieve the required unique +the declarative part you must use the ``Parameter_Types`` and +``Result_Type`` parameters to achieve the required unique designation. Subtype marks in these parameters must exactly match the subtypes in the corresponding function specification, using positional notation to match parameters with subtype marks. -The form with an `'Access` attribute can be used to match an +The form with an ``'Access`` attribute can be used to match an anonymous access parameter. -You may optionally use the `Mechanism` and `Result_Mechanism` +You may optionally use the ``Mechanism`` and ``Result_Mechanism`` parameters to specify passing mechanisms for the parameters and result. If you specify a single mechanism name, it applies to all parameters. Otherwise you may specify a mechanism on a @@ -2608,10 +2676,10 @@ Syntax: This pragma designates an object as imported, and apart from the extended rules for external symbols, is identical in effect to the use of -the normal `Import` pragma applied to an object. Unlike the -subprogram case, you need not use a separate `Import` pragma, +the normal ``Import`` pragma applied to an object. Unlike the +subprogram case, you need not use a separate ``Import`` pragma, although you may do so (and probably should do so from a portability -point of view). `size` is syntax checked, but otherwise ignored by +point of view). ``size`` is syntax checked, but otherwise ignored by GNAT. Pragma Import_Procedure @@ -2650,9 +2718,9 @@ Syntax: MECHANISM_NAME ::= Value | Reference -This pragma is identical to `Import_Function` except that it +This pragma is identical to ``Import_Function`` except that it applies to a procedure rather than a function and the parameters -`Result_Type` and `Result_Mechanism` are not permitted. +``Result_Type`` and ``Result_Mechanism`` are not permitted. Pragma Import_Valued_Procedure ============================== @@ -2690,13 +2758,13 @@ Syntax: MECHANISM_NAME ::= Value | Reference -This pragma is identical to `Import_Procedure` except that the -first parameter of `LOCAL_NAME`, which must be present, must be of -mode `OUT`, and externally the subprogram is treated as a function +This pragma is identical to ``Import_Procedure`` except that the +first parameter of ``LOCAL_NAME``, which must be present, must be of +mode ``out``, and externally the subprogram is treated as a function with this parameter as the result of the function. The purpose of this -capability is to allow the use of `OUT` and `IN OUT` +capability is to allow the use of ``out`` and ``in out`` parameters in interfacing to external functions (which are not permitted -in Ada functions). You may optionally use the `Mechanism` +in Ada functions). You may optionally use the ``Mechanism`` parameters to specify passing mechanisms for the parameters. If you specify a single mechanism name, it applies to all parameters. Otherwise you may specify a mechanism on a parameter by parameter @@ -2761,7 +2829,7 @@ Syntax: pragma Initial_Condition (boolean_EXPRESSION); -For the semantics of this pragma, see the entry for aspect `Initial_Condition` +For the semantics of this pragma, see the entry for aspect ``Initial_Condition`` in the SPARK 2014 Reference Manual, section 7.1.6. Pragma Initialize_Scalars @@ -2776,7 +2844,7 @@ Syntax: pragma Initialize_Scalars; -This pragma is similar to `Normalize_Scalars` conceptually but has +This pragma is similar to ``Normalize_Scalars`` conceptually but has two important differences. First, there is no requirement for the pragma to be used uniformly in all units of a partition, in particular, it is fine to use this just for some or all of the application units of a partition, @@ -2810,16 +2878,16 @@ It is even possible to change the value at execution time eliminating even the need to rebind with a different switch using an environment variable. See the GNAT User's Guide for details. -Note that pragma `Initialize_Scalars` is particularly useful in +Note that pragma ``Initialize_Scalars`` is particularly useful in conjunction with the enhanced validity checking that is now provided in GNAT, which checks for invalid values under more conditions. Using this feature (see description of the *-gnatV* flag in the GNAT User's Guide) in conjunction with -pragma `Initialize_Scalars` +pragma ``Initialize_Scalars`` provides a powerful new tool to assist in the detection of problems caused by uninitialized variables. -Note: the use of `Initialize_Scalars` has a fairly extensive +Note: the use of ``Initialize_Scalars`` has a fairly extensive effect on the generated code. This may cause your code to be substantially larger. It may also cause an increase in the amount of stack required, so it is probably a good idea to turn on stack @@ -2850,7 +2918,7 @@ Syntax: INPUT ::= name -For the semantics of this pragma, see the entry for aspect `Initializes` in the +For the semantics of this pragma, see the entry for aspect ``Initializes`` in the SPARK 2014 Reference Manual, section 7.1.5. .. _Pragma-Inline_Always: @@ -2866,13 +2934,13 @@ Syntax: pragma Inline_Always (NAME [, NAME]); -Similar to pragma `Inline` except that inlining is unconditional. +Similar to pragma ``Inline`` except that inlining is unconditional. Inline_Always instructs the compiler to inline every direct call to the subprogram or else to emit a compilation error, independently of any option, in particular *-gnatn* or *-gnatN* or the optimization level. -It is an error to take the address or access of `NAME`. It is also an error to +It is an error to take the address or access of ``NAME``. It is also an error to apply this pragma to a primitive operation of a tagged type. Thanks to such -restrictions, the compiler is allowed to remove the out-of-line body of `NAME`. +restrictions, the compiler is allowed to remove the out-of-line body of ``NAME``. Pragma Inline_Generic ===================== @@ -2888,7 +2956,7 @@ Syntax: This pragma is provided for compatibility with Dec Ada 83. It has -no effect in `GNAT` (which always inlines generics), other +no effect in GNAT (which always inlines generics), other than to check that the given names are all names of generic units or generic instances. @@ -2908,14 +2976,14 @@ Syntax: This pragma is identical in syntax and semantics to -the standard Ada pragma `Import`. It is provided for compatibility +the standard Ada pragma ``Import``. It is provided for compatibility with Ada 83. The definition is upwards compatible both with pragma -`Interface` as defined in the Ada 83 Reference Manual, and also +``Interface`` as defined in the Ada 83 Reference Manual, and also with some extended implementations of this pragma in certain Ada 83 -implementations. The only difference between pragma `Interface` -and pragma `Import` is that there is special circuitry to allow +implementations. The only difference between pragma ``Interface`` +and pragma ``Import`` is that there is special circuitry to allow both pragmas to appear for the same subprogram entity (normally it -is illegal to have multiple `Import` pragmas. This is useful in +is illegal to have multiple ``Import`` pragmas. This is useful in maintaining Ada 83/Ada 95 compatibility and is compatible with other Ada 83 compilers. @@ -2936,7 +3004,7 @@ Syntax: This pragma provides an alternative way of specifying the interface name for an interfaced subprogram, and is provided for compatibility with Ada 83 compilers that use the pragma for this purpose. You must provide at -least one of `External_Name` or `Link_Name`. +least one of ``External_Name`` or ``Link_Name``. Pragma Interrupt_Handler ======================== @@ -2955,7 +3023,7 @@ the pragma can also be specified for nonprotected parameterless procedures that are declared at the library level (which includes procedures declared at the top level of a library package). In the case of AAMP, when this pragma is applied to a nonprotected procedure, the instruction -`IERET` is generated for returns from the procedure, enabling +``IERET`` is generated for returns from the procedure, enabling maskable interrupts, in place of the normal return instruction. Pragma Interrupt_State @@ -2973,17 +3041,17 @@ Syntax: Normally certain interrupts are reserved to the implementation. Any attempt to attach an interrupt causes Program_Error to be raised, as described in -RM C.3.2(22). A typical example is the `SIGINT` interrupt used in +RM C.3.2(22). A typical example is the ``SIGINT`` interrupt used in many systems for an :kbd:`Ctrl-C` interrupt. Normally this interrupt is reserved to the implementation, so that :kbd:`Ctrl-C` can be used to -interrupt execution. Additionally, signals such as `SIGSEGV`, -`SIGABRT`, `SIGFPE` and `SIGILL` are often mapped to specific +interrupt execution. Additionally, signals such as ``SIGSEGV``, +``SIGABRT``, ``SIGFPE`` and ``SIGILL`` are often mapped to specific Ada exceptions, or used to implement run-time functions such as the -`abort` statement and stack overflow checking. +``abort`` statement and stack overflow checking. -Pragma `Interrupt_State` provides a general mechanism for overriding +Pragma ``Interrupt_State`` provides a general mechanism for overriding such uses of interrupts. It subsumes the functionality of pragma -`Unreserve_All_Interrupts`. Pragma `Interrupt_State` is not +``Unreserve_All_Interrupts``. Pragma ``Interrupt_State`` is not available on Windows or VMS. On all other platforms than VxWorks, it applies to signals; on VxWorks, it applies to vectored hardware interrupts and may be used to mark interrupts required by the board support package @@ -3011,10 +3079,10 @@ Interrupts can be in one of three states: Ada.Interrupts and pragma Interrupt_Handler or Attach_Handler to provide some other action. -These states are the allowed values of the `State` parameter of the -pragma. The `Name` parameter is a value of the type -`Ada.Interrupts.Interrupt_ID`. Typically, it is a name declared in -`Ada.Interrupts.Names`. +These states are the allowed values of the ``State`` parameter of the +pragma. The ``Name`` parameter is a value of the type +``Ada.Interrupts.Interrupt_ID``. Typically, it is a name declared in +``Ada.Interrupts.Names``. This is a configuration pragma, and the binder will check that there are no inconsistencies between different units in a partition in how a @@ -3030,12 +3098,12 @@ a handler. Note that certain signals on many operating systems cannot be caught and handled by applications. In such cases, the pragma is ignored. See the -operating system documentation, or the value of the array `Reserved` -declared in the spec of package `System.OS_Interface`. +operating system documentation, or the value of the array ``Reserved`` +declared in the spec of package ``System.OS_Interface``. Overriding the default state of signals used by the Ada runtime may interfere with an application's runtime behavior in the cases of the synchronous signals, -and in the case of the signal used to implement the `abort` statement. +and in the case of the signal used to implement the ``abort`` statement. .. _Pragma-Invariant: @@ -3089,13 +3157,13 @@ Syntax: pragma Keep_Names ([On =>] enumeration_first_subtype_LOCAL_NAME); -The `LOCAL_NAME` argument +The ``LOCAL_NAME`` argument must refer to an enumeration first subtype in the current declarative part. The effect is to retain the enumeration -literal names for use by `Image` and `Value` even if a global -`Discard_Names` pragma applies. This is useful when you want to +literal names for use by ``Image`` and ``Value`` even if a global +``Discard_Names`` pragma applies. This is useful when you want to generally suppress enumeration literal names and for example you therefore -use a `Discard_Names` pragma in the :file:`gnat.adc` file, but you +use a ``Discard_Names`` pragma in the :file:`gnat.adc` file, but you want to retain the names for specific enumeration types. Pragma License @@ -3112,7 +3180,7 @@ Syntax: This pragma is provided to allow automated checking for appropriate license conditions with respect to the standard and modified GPL. A pragma -`License`, which is a configuration pragma that typically appears at +``License``, which is a configuration pragma that typically appears at the start of a source file or in a separate :file:`gnat.adc` file, specifies the licensing conditions of a unit as follows: @@ -3123,7 +3191,7 @@ the licensing conditions of a unit as follows: * GPL This is used for a unit that is licensed under the unmodified GPL, and which - therefore cannot be `with`'ed by a restricted unit. + therefore cannot be ``with``\ ed by a restricted unit. * Modified_GPL This is used for a unit licensed under the GNAT modified GPL that includes @@ -3135,12 +3203,12 @@ the licensing conditions of a unit as follows: This is used for a unit that is restricted in that it is not permitted to depend on units that are licensed under the GPL. Typical examples are proprietary code that is to be released under more restrictive license - conditions. Note that restricted units are permitted to `with` units + conditions. Note that restricted units are permitted to ``with`` units which are licensed under the modified GPL (this is the whole point of the modified GPL). -Normally a unit with no `License` pragma is considered to have an +Normally a unit with no ``License`` pragma is considered to have an unknown license, and no checking is done. However, standard GNAT headers are recognized, and license information is derived from them as follows. @@ -3158,7 +3226,7 @@ then the unit is assumed to be unrestricted. These default actions means that a program with a restricted license pragma will automatically get warnings if a GPL unit is inappropriately -`with`'ed. For example, the program: +``with``\ ed. For example, the program: .. code-block:: ada @@ -3169,7 +3237,7 @@ will automatically get warnings if a GPL unit is inappropriately end Secret_Stuff -if compiled with pragma `License` (`Restricted`) in a +if compiled with pragma ``License`` (``Restricted``) in a :file:`gnat.adc` file will generate the warning:: 1. with Sem_Ch3; @@ -3180,9 +3248,9 @@ if compiled with pragma `License` (`Restricted`) in a 3. procedure Secret_Stuff is -Here we get a warning on `Sem_Ch3` since it is part of the GNAT +Here we get a warning on ``Sem_Ch3`` since it is part of the GNAT compiler and is licensed under the -GPL, but no warning for `GNAT.Sockets` which is part of the GNAT +GPL, but no warning for ``GNAT.Sockets`` which is part of the GNAT run time, and is therefore licensed under the modified GPL. Pragma Link_With @@ -3197,7 +3265,7 @@ Syntax: This pragma is provided for compatibility with certain Ada 83 compilers. -It has exactly the same effect as pragma `Linker_Options` except +It has exactly the same effect as pragma ``Linker_Options`` except that spaces occurring within one of the string expressions are treated as separators. For example, in the following case: @@ -3206,7 +3274,7 @@ as separators. For example, in the following case: pragma Link_With ("-labc -ldef"); -results in passing the strings `-labc` and `-ldef` as two +results in passing the strings ``-labc`` and ``-ldef`` as two separate arguments to the linker. In addition pragma Link_With allows multiple arguments, with the same effect as successive pragmas. @@ -3223,21 +3291,21 @@ Syntax: [Target =>] static_string_EXPRESSION); -`LOCAL_NAME` must refer to an object that is declared at the library +``LOCAL_NAME`` must refer to an object that is declared at the library level. This pragma establishes the given entity as a linker alias for the -given target. It is equivalent to `__attribute__((alias))` in GNU C -and causes `LOCAL_NAME` to be emitted as an alias for the symbol -`static_string_EXPRESSION` in the object file, that is to say no space -is reserved for `LOCAL_NAME` by the assembler and it will be resolved -to the same address as `static_string_EXPRESSION` by the linker. +given target. It is equivalent to ``__attribute__((alias))`` in GNU C +and causes ``LOCAL_NAME`` to be emitted as an alias for the symbol +``static_string_EXPRESSION`` in the object file, that is to say no space +is reserved for ``LOCAL_NAME`` by the assembler and it will be resolved +to the same address as ``static_string_EXPRESSION`` by the linker. The actual linker name for the target must be used (e.g., the fully encoded name with qualification in Ada, or the mangled name in C++), -or it must be declared using the C convention with `pragma Import` -or `pragma Export`. +or it must be declared using the C convention with ``pragma Import`` +or ``pragma Export``. Not all target machines support this pragma. On some of them it is accepted -only if `pragma Weak_External` has been applied to `LOCAL_NAME`. +only if ``pragma Weak_External`` has been applied to ``LOCAL_NAME``. .. code-block:: ada @@ -3264,11 +3332,11 @@ Syntax: pragma Linker_Constructor (procedure_LOCAL_NAME); -`procedure_LOCAL_NAME` must refer to a parameterless procedure that +``procedure_LOCAL_NAME`` must refer to a parameterless procedure that is declared at the library level. A procedure to which this pragma is applied will be treated as an initialization routine by the linker. -It is equivalent to `__attribute__((constructor))` in GNU C and -causes `procedure_LOCAL_NAME` to be invoked before the entry point +It is equivalent to ``__attribute__((constructor))`` in GNU C and +causes ``procedure_LOCAL_NAME`` to be invoked before the entry point of the executable is called (or immediately after the shared library is loaded if the procedure is linked in a shared library), in particular before the Ada run-time environment is set up. @@ -3294,16 +3362,16 @@ Syntax: pragma Linker_Destructor (procedure_LOCAL_NAME); -`procedure_LOCAL_NAME` must refer to a parameterless procedure that +``procedure_LOCAL_NAME`` must refer to a parameterless procedure that is declared at the library level. A procedure to which this pragma is applied will be treated as a finalization routine by the linker. -It is equivalent to `__attribute__((destructor))` in GNU C and -causes `procedure_LOCAL_NAME` to be invoked after the entry point +It is equivalent to ``__attribute__((destructor))`` in GNU C and +causes ``procedure_LOCAL_NAME`` to be invoked after the entry point of the executable has exited (or immediately before the shared library is unloaded if the procedure is linked in a shared library), in particular after the Ada run-time environment is shut down. -See `pragma Linker_Constructor` for the set of restrictions that apply +See ``pragma Linker_Constructor`` for the set of restrictions that apply because of these specific contexts. .. _Pragma-Linker_Section: @@ -3321,18 +3389,18 @@ Syntax: [Section =>] static_string_EXPRESSION); -`LOCAL_NAME` must refer to an object, type, or subprogram that is +``LOCAL_NAME`` must refer to an object, type, or subprogram that is declared at the library level. This pragma specifies the name of the linker section for the given entity. It is equivalent to -`__attribute__((section))` in GNU C and causes `LOCAL_NAME` to -be placed in the `static_string_EXPRESSION` section of the +``__attribute__((section))`` in GNU C and causes ``LOCAL_NAME`` to +be placed in the ``static_string_EXPRESSION`` section of the executable (assuming the linker doesn't rename the section). GNAT also provides an implementation defined aspect of the same name. In the case of specifying this aspect for a type, the effect is to -specify the corresponding for all library level objects of the type which -do not have an explicit linker section set. Note that this only applies to -whole objects, not to components of composite objects. +specify the corresponding section for all library-level objects of +the type that do not have an explicit linker section set. Note that +this only applies to whole objects, not to components of composite objects. In the case of a subprogram, the linker section applies to all previously declared matching overloaded subprograms in the current declarative part @@ -3348,8 +3416,8 @@ linker section is specified should has the default linker section. The compiler normally places library-level entities in standard sections depending on the class: procedures and functions generally go in the -`.text` section, initialized variables in the `.data` section -and uninitialized variables in the `.bss` section. +``.text`` section, initialized variables in the ``.data`` section +and uninitialized variables in the ``.bss`` section. Other, special sections may exist on given target machines to map special hardware, for example I/O ports or flash memory. This pragma is a means to @@ -3359,8 +3427,8 @@ at the symbolic level with the compiler. Some file formats do not support arbitrary sections so not all target machines support this pragma. The use of this pragma may cause a program execution to be erroneous if it is used to place an entity into an -inappropriate section (e.g., a modified variable into the `.text` -section). See also `pragma Persistent_BSS`. +inappropriate section (e.g., a modified variable into the ``.text`` +section). See also ``pragma Persistent_BSS``. .. code-block:: ada @@ -3405,12 +3473,12 @@ Syntax: pragma Loop_Invariant ( boolean_EXPRESSION ); -The effect of this pragma is similar to that of pragma `Assert`, -except that in an `Assertion_Policy` pragma, the identifier -`Loop_Invariant` is used to control whether it is ignored or checked +The effect of this pragma is similar to that of pragma ``Assert``, +except that in an ``Assertion_Policy`` pragma, the identifier +``Loop_Invariant`` is used to control whether it is ignored or checked (or disabled). -`Loop_Invariant` can only appear as one of the items in the sequence +``Loop_Invariant`` can only appear as one of the items in the sequence of statements of a loop body, or nested inside block statements that appear in the sequence of statements of a loop body. The intention is that it be used to @@ -3418,14 +3486,14 @@ represent a "loop invariant" assertion, i.e. something that is true each time through the loop, and which can be used to show that the loop is achieving its purpose. -Multiple `Loop_Invariant` and `Loop_Variant` pragmas that +Multiple ``Loop_Invariant`` and ``Loop_Variant`` pragmas that apply to the same loop should be grouped in the same sequence of statements. -To aid in writing such invariants, the special attribute `Loop_Entry` +To aid in writing such invariants, the special attribute ``Loop_Entry`` may be used to refer to the value of an expression on entry to the loop. This -attribute can only be used within the expression of a `Loop_Invariant` -pragma. For full details, see documentation of attribute `Loop_Entry`. +attribute can only be used within the expression of a ``Loop_Invariant`` +pragma. For full details, see documentation of attribute ``Loop_Entry``. Pragma Loop_Optimize ==================== @@ -3494,7 +3562,7 @@ Syntax: CHANGE_DIRECTION ::= Increases | Decreases -`Loop_Variant` can only appear as one of the items in the sequence +``Loop_Variant`` can only appear as one of the items in the sequence of statements of a loop body, or nested inside block statements that appear in the sequence of statements of a loop body. It allows the specification of quantities which must always @@ -3511,23 +3579,23 @@ in a nesting lexicographic manner. For example: specifies that each time through the loop either X increases, or X stays -the same and Y decreases. A `Loop_Variant` pragma ensures that the +the same and Y decreases. A ``Loop_Variant`` pragma ensures that the loop is making progress. It can be useful in helping to show informally or prove formally that the loop always terminates. -`Loop_Variant` is an assertion whose effect can be controlled using -an `Assertion_Policy` with a check name of `Loop_Variant`. The -policy can be `Check` to enable the loop variant check, `Ignore` +``Loop_Variant`` is an assertion whose effect can be controlled using +an ``Assertion_Policy`` with a check name of ``Loop_Variant``. The +policy can be ``Check`` to enable the loop variant check, ``Ignore`` to ignore the check (in which case the pragma has no effect on the program), -or `Disable` in which case the pragma is not even checked for correct +or ``Disable`` in which case the pragma is not even checked for correct syntax. -Multiple `Loop_Invariant` and `Loop_Variant` pragmas that +Multiple ``Loop_Invariant`` and ``Loop_Variant`` pragmas that apply to the same loop should be grouped in the same sequence of statements. -The `Loop_Entry` attribute may be used within the expressions of the -`Loop_Variant` pragma to refer to values on entry to the loop. +The ``Loop_Entry`` attribute may be used within the expressions of the +``Loop_Variant`` pragma to refer to values on entry to the loop. Pragma Machine_Attribute ======================== @@ -3545,11 +3613,11 @@ Syntax: Machine-dependent attributes can be specified for types and/or declarations. This pragma is semantically equivalent to -`__attribute__((`attribute_name`))` (if `info` is not -specified) or `__attribute__((`attribute_name`(`info`))) -in GNU C, where ``attribute_name`` is recognized by the -compiler middle-end or the `TARGET_ATTRIBUTE_TABLE` machine -specific macro. A string literal for the optional parameter `info` +:samp:`__attribute__(({attribute_name}))` (if ``info`` is not +specified) or :samp:`__attribute__(({attribute_name(info})))` +in GNU C, where *attribute_name* is recognized by the +compiler middle-end or the ``TARGET_ATTRIBUTE_TABLE`` machine +specific macro. A string literal for the optional parameter ``info`` is transformed into an identifier, which may make this pragma unusable for some attributes. For further information see :title:`GNU Compiler Collection (GCC) Internals`. @@ -3587,6 +3655,8 @@ Syntax:: This pragma is provided for compatibility with OpenVMS VAX Systems. It has no effect in GNAT, other than being syntax checked. +.. _Pragma-Max_Queue_Length: + Pragma Max_Queue_Length ======================= @@ -3623,6 +3693,25 @@ such a way that a body needed before is no longer needed. The provision of a dummy body with a No_Body pragma ensures that there is no interference from earlier versions of the package body. +Pragma No_Component_Reordering +============================== + +Syntax: + + +:: + + pragma No_Component_Reordering [([Entity =>] type_LOCAL_NAME)]; + + +``type_LOCAL_NAME`` must refer to a record type declaration in the current +declarative part. The effect is to preclude any reordering of components +for the layout of the record, i.e. the record is laid out by the compiler +in the order in which the components are declared textually. The form with +no argument is a configuration pragma which applies to all record types +declared in units to which the pragma applies and there is a requirement +that this pragma be used consistently within a partition. + .. _Pragma-No_Elaboration_Code_All: Pragma No_Elaboration_Code_All @@ -3637,7 +3726,7 @@ Syntax: This is a program unit pragma (there is also an equivalent aspect of the -same name) that establishes the restriction `No_Elaboration_Code` for +same name) that establishes the restriction ``No_Elaboration_Code`` for the current unit and any extended main source units (body and subunits). It also has the effect of enforcing a transitive application of this aspect, so that if any unit is implicitly or explicitly with'ed by the @@ -3655,27 +3744,29 @@ Syntax: pragma No_Heap_Finalization [ (first_subtype_LOCAL_NAME) ]; -Pragma `No_Heap_Finalization` may be used as a configuration pragma or as a +Pragma ``No_Heap_Finalization`` may be used as a configuration pragma or as a type-specific pragma. In its configuration form, the pragma must appear within a configuration file such as gnat.adc, without an argument. The pragma suppresses the call to -`Finalize` for heap-allocated objects created through library-level named +``Finalize`` for heap-allocated objects created through library-level named access-to-object types in cases where the designated type requires finalization actions. In its type-specific form, the argument of the pragma must denote a library-level named access-to-object type. The pragma suppresses the call to -`Finalize` for heap-allocated objects created through the specific access type +``Finalize`` for heap-allocated objects created through the specific access type in cases where the designated type requires finalization actions. It is still possible to finalize such heap-allocated objects by explicitly deallocating them. A library-level named access-to-object type declared within a generic unit will -lose its `No_Heap_Finalization` pragma when the corresponding instance does not +lose its ``No_Heap_Finalization`` pragma when the corresponding instance does not appear at the library level. +.. _Pragma-No_Inline: + Pragma No_Inline ================ @@ -3688,11 +3779,11 @@ Syntax: This pragma suppresses inlining for the callable entity or the instances of -the generic subprogram designated by `NAME`, including inlining that -results from the use of pragma `Inline`. This pragma is always active, +the generic subprogram designated by ``NAME``, including inlining that +results from the use of pragma ``Inline``. This pragma is always active, in particular it is not subject to the use of option *-gnatn* or -*-gnatN*. It is illegal to specify both pragma `No_Inline` and -pragma `Inline_Always` for the same `NAME`. +*-gnatN*. It is illegal to specify both pragma ``No_Inline`` and +pragma ``Inline_Always`` for the same ``NAME``. Pragma No_Return ================ @@ -3705,9 +3796,9 @@ Syntax: pragma No_Return (procedure_LOCAL_NAME {, procedure_LOCAL_NAME}); -Each `procedure_LOCAL_NAME` argument must refer to one or more procedure +Each ``procedure_LOCAL_NAME`` argument must refer to one or more procedure declarations in the current declarative part. A procedure to which this -pragma is applied may not contain any explicit `return` statements. +pragma is applied may not contain any explicit ``return`` statements. In addition, if the procedure contains any implicit returns from falling off the end of a statement sequence, then execution of that implicit return will cause Program_Error to be raised. @@ -3735,7 +3826,7 @@ Syntax: This is an obsolete configuration pragma that historically was used to set up a runtime library with no object code. It is now used only for internal testing. The pragma has been superseded by the reconfigurable -runtime capability of `GNAT`. +runtime capability of GNAT. Pragma No_Strict_Aliasing ========================= @@ -3748,7 +3839,7 @@ Syntax: pragma No_Strict_Aliasing [([Entity =>] type_LOCAL_NAME)]; -`type_LOCAL_NAME` must refer to an access type +``type_LOCAL_NAME`` must refer to an access type declaration in the current declarative part. The effect is to inhibit strict aliasing optimization for the given type. The form with no arguments is a configuration pragma which applies to all access types @@ -3769,7 +3860,6 @@ Syntax: :: - pragma No_Tagged_Streams; pragma No_Tagged_Streams [([Entity =>] tagged_type_LOCAL_NAME)]; @@ -3780,7 +3870,7 @@ or derived types). This can involve the generation of significant amounts of code which is wasted space if stream routines are not needed for the type in question. -The `No_Tagged_Streams` pragma causes the generation of these stream +The ``No_Tagged_Streams`` pragma causes the generation of these stream routines to be skipped, and any attempt to use stream operations on types subject to this pragma will be statically rejected as illegal. @@ -3871,7 +3961,7 @@ are as follows: *Enumeration types* Objects of an enumeration type are initialized to all one-bits, i.e., to - the value `2 ** typ'Size - 1` unless the subtype excludes the literal + the value ``2 ** typ'Size - 1`` unless the subtype excludes the literal whose Pos value is zero, in which case a code of zero is used. This choice will always generate an invalid value if one exists. @@ -3914,25 +4004,25 @@ removed later. The effect of this pragma is to output a warning message on a reference to an entity thus marked that the subprogram is obsolescent if the appropriate -warning option in the compiler is activated. If the Message parameter is +warning option in the compiler is activated. If the ``Message`` parameter is present, then a second warning message is given containing this text. In addition, a reference to the entity is considered to be a violation of pragma -Restrictions (No_Obsolescent_Features). +``Restrictions (No_Obsolescent_Features)``. This pragma can also be used as a program unit pragma for a package, in which case the entity name is the name of the package, and the pragma indicates that the entire package is considered -obsolescent. In this case a client `with`'ing such a package -violates the restriction, and the `with` statement is +obsolescent. In this case a client ``with``\ ing such a package +violates the restriction, and the ``with`` clause is flagged with warnings if the warning option is set. -If the Version parameter is present (which must be exactly -the identifier Ada_05, no other argument is allowed), then the +If the ``Version`` parameter is present (which must be exactly +the identifier ``Ada_05``, no other argument is allowed), then the indication of obsolescence applies only when compiling in Ada 2005 mode. This is primarily intended for dealing with the situations in the predefined library where subprograms or packages have become defined as obsolescent in Ada 2005 -(e.g., in Ada.Characters.Handling), but may be used anywhere. +(e.g., in ``Ada.Characters.Handling``), but may be used anywhere. The following examples show typical uses of this pragma: @@ -3972,8 +4062,8 @@ The following examples show typical uses of this pragma: Note that, as for all pragmas, if you use a pragma argument identifier, then all subsequent parameters must also use a pragma argument identifier. -So if you specify "Entity =>" for the Entity argument, and a Message -argument is present, it must be preceded by "Message =>". +So if you specify ``Entity =>`` for the ``Entity`` argument, and a ``Message`` +argument is present, it must be preceded by ``Message =>``. Pragma Optimize_Alignment ========================= @@ -4018,7 +4108,7 @@ Integer field X are efficient. But this means that objects of the type end up with a size of 8 bytes. This is a valid choice, since sizes of objects are allowed to be bigger than the size of the type, but it can waste space if for example fields of type R appear in an enclosing record. If the above type is -compiled in `Optimize_Alignment (Space)` mode, the alignment is set to 1. +compiled in ``Optimize_Alignment (Space)`` mode, the alignment is set to 1. However, there is one case in which SPACE is ignored. If a variable length record (that is a discriminated record with a component which is an array @@ -4047,7 +4137,7 @@ small types with sizes that are not a power of 2. For example, consider: The default alignment for this record is normally 1, but if this type is -compiled in `Optimize_Alignment (Time)` mode, then the alignment is set +compiled in ``Optimize_Alignment (Time)`` mode, then the alignment is set to 4, which wastes space for objects of the type, since they are now 4 bytes long, but results in more efficient access when the whole record is referenced. @@ -4080,7 +4170,7 @@ For example, consider: type Color is (Red, Blue, Green, Yellow); -By Ada semantics `Blue > Red` and `Green > Blue`, +By Ada semantics ``Blue > Red`` and ``Green > Blue``, but really these relations make no sense; the enumeration type merely specifies a set of possible colors, and the order is unimportant. @@ -4103,7 +4193,7 @@ entries have to be added to the enumeration type. Instead, the code in the client should list the possibilities, or an appropriate subtype should be declared in the unit that declares the original enumeration type. E.g., the following subtype could -be declared along with the type `Color`: +be declared along with the type ``Color``: .. code-block:: ada @@ -4145,16 +4235,16 @@ on the ordering. GNAT provides a pragma to mark enumerations as ordered rather than one to mark them as unordered, since in our experience, the great majority of enumeration types are conceptually unordered. -The types `Boolean`, `Character`, `Wide_Character`, -and `Wide_Wide_Character` +The types ``Boolean``, ``Character``, ``Wide_Character``, +and ``Wide_Wide_Character`` are considered to be ordered types, so each is declared with a -pragma `Ordered` in package `Standard`. +pragma ``Ordered`` in package ``Standard``. -Normally pragma `Ordered` serves only as documentation and a guide for +Normally pragma ``Ordered`` serves only as documentation and a guide for coding standards, but GNAT provides a warning switch *-gnatw.u* that requests warnings for inappropriate uses (comparisons and explicit subranges) for unordered types. If this switch is used, then any -enumeration type not marked with pragma `Ordered` will be considered +enumeration type not marked with pragma ``Ordered`` will be considered as unordered, and will generate warnings for inappropriate uses. Note that generic types are not considered ordered or unordered (since the @@ -4182,25 +4272,25 @@ Syntax: This pragma sets the current overflow mode to the given setting. For details of the meaning of these modes, please refer to the 'Overflow Check Handling in GNAT' appendix in the -GNAT User's Guide. If only the `General` parameter is present, +GNAT User's Guide. If only the ``General`` parameter is present, the given mode applies to all expressions. If both parameters are present, -the `General` mode applies to expressions outside assertions, and -the `Eliminated` mode applies to expressions within assertions. +the ``General`` mode applies to expressions outside assertions, and +the ``Eliminated`` mode applies to expressions within assertions. -The case of the `MODE` parameter is ignored, -so `MINIMIZED`, `Minimized` and -`minimized` all have the same effect. +The case of the ``MODE`` parameter is ignored, +so ``MINIMIZED``, ``Minimized`` and +``minimized`` all have the same effect. -The `Overflow_Mode` pragma has the same scoping and placement -rules as pragma `Suppress`, so it can occur either as a +The ``Overflow_Mode`` pragma has the same scoping and placement +rules as pragma ``Suppress``, so it can occur either as a configuration pragma, specifying a default for the whole program, or in a declarative scope, where it applies to the remaining declarations and statements in that scope. -The pragma `Suppress (Overflow_Check)` suppresses +The pragma ``Suppress (Overflow_Check)`` suppresses overflow checking, but does not affect the overflow mode. -The pragma `Unsuppress (Overflow_Check)` unsuppresses (enables) +The pragma ``Unsuppress (Overflow_Check)`` unsuppresses (enables) overflow checking, but does not affect the overflow mode. Pragma Overriding_Renamings @@ -4269,7 +4359,7 @@ Syntax: ABSTRACT_STATE ::= NAME -For the semantics of this pragma, see the entry for aspect `Part_Of` in the +For the semantics of this pragma, see the entry for aspect ``Part_Of`` in the SPARK 2014 Reference Manual, section 7.2.6. Pragma Passive @@ -4286,10 +4376,10 @@ Syntax: Syntax checked, but otherwise ignored by GNAT. This is recognized for compatibility with DEC Ada 83 implementations, where it is used within a task definition to request that a task be made passive. If the argument -`Semaphore` is present, or the argument is omitted, then DEC Ada 83 +``Semaphore`` is present, or the argument is omitted, then DEC Ada 83 treats the pragma as an assertion that the containing task is passive and that optimization of context switch with this task is permitted and -desired. If the argument `No` is present, the task must not be +desired. If the argument ``No`` is present, the task must not be optimized. GNAT does not attempt to optimize any tasks in this manner (since protected objects are available in place of passive tasks). @@ -4309,15 +4399,15 @@ Syntax: pragma Persistent_BSS [(LOCAL_NAME)] -This pragma allows selected objects to be placed in the `.persistent_bss` +This pragma allows selected objects to be placed in the ``.persistent_bss`` section. On some targets the linker and loader provide for special treatment of this section, allowing a program to be reloaded without affecting the contents of this data (hence the name persistent). There are two forms of usage. If an argument is given, it must be the -local name of a library level object, with no explicit initialization +local name of a library-level object, with no explicit initialization and whose type is potentially persistent. If no argument is given, then -the pragma is a configuration pragma, and applies to all library level +the pragma is a configuration pragma, and applies to all library-level objects with no explicit initialization of potentially persistent types. A potentially persistent type is a scalar type, or an untagged, @@ -4327,7 +4417,7 @@ or an array, all of whose constraints are static, and whose component type is potentially persistent. If this pragma is used on a target where this feature is not supported, -then the pragma will be ignored. See also `pragma Linker_Section`. +then the pragma will be ignored. See also ``pragma Linker_Section``. Pragma Polling ============== @@ -4341,31 +4431,31 @@ Syntax: This pragma controls the generation of polling code. This is normally off. -If `pragma Polling (ON)` is used then periodic calls are generated to -the routine `Ada.Exceptions.Poll`. This routine is a separate unit in the +If ``pragma Polling (ON)`` is used then periodic calls are generated to +the routine ``Ada.Exceptions.Poll``. This routine is a separate unit in the runtime library, and can be found in file :file:`a-excpol.adb`. -Pragma `Polling` can appear as a configuration pragma (for example it +Pragma ``Polling`` can appear as a configuration pragma (for example it can be placed in the :file:`gnat.adc` file) to enable polling globally, or it can be used in the statement or declaration sequence to control polling more locally. A call to the polling routine is generated at the start of every loop and -at the start of every subprogram call. This guarantees that the `Poll` +at the start of every subprogram call. This guarantees that the ``Poll`` routine is called frequently, and places an upper bound (determined by -the complexity of the code) on the period between two `Poll` calls. +the complexity of the code) on the period between two ``Poll`` calls. The primary purpose of the polling interface is to enable asynchronous aborts on targets that cannot otherwise support it (for example Windows NT), but it may be used for any other purpose requiring periodic polling. The standard version is null, and can be replaced by a user program. This -will require re-compilation of the `Ada.Exceptions` package that can +will require re-compilation of the ``Ada.Exceptions`` package that can be found in files :file:`a-except.ads` and :file:`a-except.adb`. A standard alternative unit (in file :file:`4wexcpol.adb` in the standard GNAT distribution) is used to enable the asynchronous abort capability on targets that do not normally support the capability. The version of -`Poll` in this file makes a call to the appropriate runtime routine +``Poll`` in this file makes a call to the appropriate runtime routine to test for an abort condition. Note that polling can also be enabled by use of the *-gnatP* switch. @@ -4386,9 +4476,9 @@ Syntax: pragma Post (Boolean_Expression); -The `Post` pragma is intended to be an exact replacement for +The ``Post`` pragma is intended to be an exact replacement for the language-defined -`Post` aspect, and shares its restrictions and semantics. +``Post`` aspect, and shares its restrictions and semantics. It must appear either immediately following the corresponding subprogram declaration (only other pragmas may intervene), or if there is no separate subprogram declaration, then it can @@ -4412,7 +4502,7 @@ Syntax: [,[Message =>] String_Expression]); -The `Postcondition` pragma allows specification of automatic +The ``Postcondition`` pragma allows specification of automatic postcondition checks for subprograms. These checks are similar to assertions, but are automatically inserted just prior to the return statements of the subprogram with which they are associated (including @@ -4423,7 +4513,7 @@ In addition, the boolean expression which is the condition which must be true may contain references to function'Result in the case of a function to refer to the returned value. -`Postcondition` pragmas may appear either immediately following the +``Postcondition`` pragmas may appear either immediately following the (separate) declaration of a subprogram, or at the start of the declarations of a subprogram body. Only other pragmas may intervene (that is appear between the subprogram declaration and its @@ -4437,8 +4527,8 @@ The postconditions are collected and automatically tested just before any return (implicit or explicit) in the subprogram body. A postcondition is only recognized if postconditions are active at the time the pragma is encountered. The compiler switch *gnata* -turns on all postconditions by default, and pragma `Check_Policy` -with an identifier of `Postcondition` can also be used to +turns on all postconditions by default, and pragma ``Check_Policy`` +with an identifier of ``Postcondition`` can also be used to control whether postconditions are active. The general approach is that postconditions are placed in the spec @@ -4478,7 +4568,7 @@ might have the following postcondition: end Sqrt -As this example, shows, the use of the `Old` attribute +As this example, shows, the use of the ``Old`` attribute is often useful in postconditions to refer to the state on entry to the subprogram. @@ -4487,7 +4577,7 @@ from the subprogram. If an abnormal return results from raising an exception, then the postconditions are not checked. If a postcondition fails, then the exception -`System.Assertions.Assert_Failure` is raised. If +``System.Assertions.Assert_Failure`` is raised. If a message argument was supplied, then the given string will be used as the exception message. If no message argument was supplied, then the default message has @@ -4529,7 +4619,7 @@ mutually recursive postconditions as in: There are no restrictions on the complexity or form of -conditions used within `Postcondition` pragmas. +conditions used within ``Postcondition`` pragmas. The following example shows that it is even possible to verify performance behavior. @@ -4558,12 +4648,12 @@ inlining (-gnatN option set) are accepted and legality-checked by the compiler, but are ignored at run-time even if postcondition checking is enabled. -Note that pragma `Postcondition` differs from the language-defined -`Post` aspect (and corresponding `Post` pragma) in allowing +Note that pragma ``Postcondition`` differs from the language-defined +``Post`` aspect (and corresponding ``Post`` pragma) in allowing multiple occurrences, allowing occurences in the body even if there is a separate spec, and allowing a second string parameter, and the -use of the pragma identifier `Check`. Historically, pragma -`Postcondition` was implemented prior to the development of +use of the pragma identifier ``Check``. Historically, pragma +``Postcondition`` was implemented prior to the development of Ada 2012, and has been retained in its original form for compatibility purposes. @@ -4582,24 +4672,24 @@ Syntax: pragma Post_Class (Boolean_Expression); -The `Post_Class` pragma is intended to be an exact replacement for +The ``Post_Class`` pragma is intended to be an exact replacement for the language-defined -`Post'Class` aspect, and shares its restrictions and semantics. +``Post'Class`` aspect, and shares its restrictions and semantics. It must appear either immediately following the corresponding subprogram declaration (only other pragmas may intervene), or if there is no separate subprogram declaration, then it can appear at the start of the declarations in a subprogram body (preceded only by other pragmas). -Note: This pragma is called `Post_Class` rather than -`Post'Class` because the latter would not be strictly +Note: This pragma is called ``Post_Class`` rather than +``Post'Class`` because the latter would not be strictly conforming to the allowed syntax for pragmas. The motivation for provinding pragmas equivalent to the aspects is to allow a program to be written using the pragmas, and then compiled if necessary using an Ada compiler that does not recognize the pragmas or aspects, but is prepared to ignore the pragmas. The assertion -policy that controls this pragma is `Post'Class`, not -`Post_Class`. +policy that controls this pragma is ``Post'Class``, not +``Post_Class``. Pragma Rename_Pragma ============================ @@ -4615,7 +4705,7 @@ Syntax: [Renamed =>] pragma_IDENTIFIER); This pragma provides a mechanism for supplying new names for existing -pragmas. The `New_Name` identifier can subsequently be used as a synonym for +pragmas. The ``New_Name`` identifier can subsequently be used as a synonym for the Renamed pragma. For example, suppose you have code that was originally developed on a compiler that supports Inline_Only as an implementation defined pragma. And suppose the semantics of pragma Inline_Only are identical to (or at @@ -4653,9 +4743,9 @@ Syntax: pragma Pre (Boolean_Expression); -The `Pre` pragma is intended to be an exact replacement for +The ``Pre`` pragma is intended to be an exact replacement for the language-defined -`Pre` aspect, and shares its restrictions and semantics. +``Pre`` aspect, and shares its restrictions and semantics. It must appear either immediately following the corresponding subprogram declaration (only other pragmas may intervene), or if there is no separate subprogram declaration, then it can @@ -4679,7 +4769,7 @@ Syntax: [,[Message =>] String_Expression]); -The `Precondition` pragma is similar to `Postcondition` +The ``Precondition`` pragma is similar to ``Postcondition`` except that the corresponding checks take place immediately upon entry to the subprogram, and if a precondition fails, the exception is raised in the context of the caller, and the attribute 'Result @@ -4700,7 +4790,7 @@ within a package spec: end Math_Functions; -`Precondition` pragmas may appear either immediately following the +``Precondition`` pragmas may appear either immediately following the (separate) declaration of a subprogram, or at the start of the declarations of a subprogram body. Only other pragmas may intervene (that is appear between the subprogram declaration and its @@ -4713,12 +4803,12 @@ inlining (-gnatN option set) are accepted and legality-checked by the compiler, but are ignored at run-time even if precondition checking is enabled. -Note that pragma `Precondition` differs from the language-defined -`Pre` aspect (and corresponding `Pre` pragma) in allowing +Note that pragma ``Precondition`` differs from the language-defined +``Pre`` aspect (and corresponding ``Pre`` pragma) in allowing multiple occurrences, allowing occurences in the body even if there is a separate spec, and allowing a second string parameter, and the -use of the pragma identifier `Check`. Historically, pragma -`Precondition` was implemented prior to the development of +use of the pragma identifier ``Check``. Historically, pragma +``Precondition`` was implemented prior to the development of Ada 2012, and has been retained in its original form for compatibility purposes. @@ -4738,10 +4828,10 @@ Syntax: This pragma (available in all versions of Ada in GNAT) encompasses both -the `Static_Predicate` and `Dynamic_Predicate` aspects in +the ``Static_Predicate`` and ``Dynamic_Predicate`` aspects in Ada 2012. A predicate is regarded as static if it has an allowed form -for `Static_Predicate` and is otherwise treated as a -`Dynamic_Predicate`. Otherwise, predicates specified by this +for ``Static_Predicate`` and is otherwise treated as a +``Dynamic_Predicate``. Otherwise, predicates specified by this pragma behave exactly as described in the Ada 2012 reference manual. For example, if we have @@ -4767,8 +4857,8 @@ the effect is identical to the following Ada 2012 code: Dynamic_Predicate => F(Q) or G(Q); -Note that there are no pragmas `Dynamic_Predicate` -or `Static_Predicate`. That is +Note that there are no pragmas ``Dynamic_Predicate`` +or ``Static_Predicate``. That is because these pragmas would affect legality and semantics of the program and thus do not have a neutral effect if ignored. The motivation behind providing pragmas equivalent to @@ -4778,7 +4868,7 @@ will ignore the pragmas. That doesn't work in the case of static and dynamic predicates, since if the corresponding pragmas are ignored, then the behavior of the program is fundamentally changed (for example a membership test -`A in B` would not take into account a predicate +``A in B`` would not take into account a predicate defined for subtype B). When following this approach, the use of predicates should be avoided. @@ -4795,9 +4885,9 @@ Syntax: [Message =>] String_Expression); -The `Predicate_Failure` pragma is intended to be an exact replacement for +The ``Predicate_Failure`` pragma is intended to be an exact replacement for the language-defined -`Predicate_Failure` aspect, and shares its restrictions and semantics. +``Predicate_Failure`` aspect, and shares its restrictions and semantics. Pragma Preelaborable_Initialization =================================== @@ -4843,7 +4933,7 @@ The pragma has no effect if the message is computed with an expression other than a static string constant, since the assumption in this case is that the program computes exactly the string it wants. If you still want the prefixing in this case, you can always call -`GNAT.Source_Info.Enclosing_Entity` and prepend the string manually. +``GNAT.Source_Info.Enclosing_Entity`` and prepend the string manually. Pragma Pre_Class ================ @@ -4860,24 +4950,24 @@ Syntax: pragma Pre_Class (Boolean_Expression); -The `Pre_Class` pragma is intended to be an exact replacement for +The ``Pre_Class`` pragma is intended to be an exact replacement for the language-defined -`Pre'Class` aspect, and shares its restrictions and semantics. +``Pre'Class`` aspect, and shares its restrictions and semantics. It must appear either immediately following the corresponding subprogram declaration (only other pragmas may intervene), or if there is no separate subprogram declaration, then it can appear at the start of the declarations in a subprogram body (preceded only by other pragmas). -Note: This pragma is called `Pre_Class` rather than -`Pre'Class` because the latter would not be strictly +Note: This pragma is called ``Pre_Class`` rather than +``Pre'Class`` because the latter would not be strictly conforming to the allowed syntax for pragmas. The motivation for providing pragmas equivalent to the aspects is to allow a program to be written using the pragmas, and then compiled if necessary using an Ada compiler that does not recognize the pragmas or aspects, but is prepared to ignore the pragmas. The assertion -policy that controls this pragma is `Pre'Class`, not -`Pre_Class`. +policy that controls this pragma is ``Pre'Class``, not +``Pre_Class``. Pragma Priority_Specific_Dispatching ==================================== @@ -4918,16 +5008,16 @@ Syntax: 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. -The other possibilities (`Restricted`, `Rational`, -`GNAT_Extended_Ravenscar`, `GNAT_Ravenscar_EDF`) +that depend on the argument. ``Ravenscar`` is standard in Ada 2005. +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. * Pragma Profile (Ravenscar) - The `Ravenscar` profile is standard in Ada 2005, + The ``Ravenscar`` profile is standard in Ada 2005, but is available in all earlier versions of Ada as an implementation-defined pragma. This profile establishes the following set of configuration pragmas: @@ -5103,9 +5193,9 @@ Syntax: This is an implementation-defined pragma that is similar in -effect to `pragma Profile` except that instead of -generating `Restrictions` pragmas, it generates -`Restriction_Warnings` pragmas. The result is that +effect to ``pragma Profile`` except that instead of +generating ``Restrictions`` pragmas, it generates +``Restriction_Warnings`` pragmas. The result is that violations of the profile generate warning messages instead of error messages. @@ -5166,7 +5256,7 @@ Syntax: | static_string_EXPRESSION -This pragma is identical in effect to pragma `Common_Object`. +This pragma is identical in effect to pragma ``Common_Object``. .. _Pragma-Pure_Function: @@ -5184,7 +5274,7 @@ Syntax: This pragma appears in the same declarative part as a function declaration (or a set of function declarations if more than one overloaded declaration exists, in which case the pragma applies -to all entities). It specifies that the function `Entity` is +to all entities). It specifies that the function ``Entity`` is to be considered pure for the purposes of code generation. This means that the compiler can assume that there are no side effects, and in particular that two calls with identical arguments produce the @@ -5192,7 +5282,7 @@ same result. It also means that the function can be used in an address clause. Note that, quite deliberately, there are no static checks to try -to ensure that this promise is met, so `Pure_Function` can be used +to ensure that this promise is met, so ``Pure_Function`` can be used with functions that are conceptually pure, even if they do modify global variables. For example, a square root function that is instrumented to count the number of times it is called is still @@ -5209,28 +5299,28 @@ the compiler may optimize away calls with identical arguments, and if that results in unexpected behavior, the proper action is not to use the pragma for subprograms that are not (conceptually) pure. -Note: Most functions in a `Pure` package are automatically pure, and -there is no need to use pragma `Pure_Function` for such functions. One +Note: Most functions in a ``Pure`` package are automatically pure, and +there is no need to use pragma ``Pure_Function`` for such functions. One exception is any function that has at least one formal of type -`System.Address` or a type derived from it. Such functions are not +``System.Address`` or a type derived from it. Such functions are not considered pure by default, since the compiler assumes that the -`Address` parameter may be functioning as a pointer and that the +``Address`` parameter may be functioning as a pointer and that the referenced data may change even if the address value does not. Similarly, imported functions are not considered to be pure by default, since there is no way of checking that they are in fact pure. The use -of pragma `Pure_Function` for such a function will override these default +of pragma ``Pure_Function`` for such a function will override these default assumption, and cause the compiler to treat a designated subprogram as pure in these cases. -Note: If pragma `Pure_Function` is applied to a renamed function, it +Note: If pragma ``Pure_Function`` is applied to a renamed function, it applies to the underlying renamed function. This can be used to disambiguate cases of overloading where some but not all functions in a set of overloaded functions are to be designated as pure. -If pragma `Pure_Function` is applied to a library level function, the +If pragma ``Pure_Function`` is applied to a library-level function, the function is also considered pure from an optimization point of view, but the unit is not a Pure unit in the categorization sense. So for example, a function -thus marked is free to `with` non-pure units. +thus marked is free to ``with`` non-pure units. Pragma Rational =============== @@ -5272,7 +5362,7 @@ compatibility purposes. It is equivalent to: pragma Profile (Ravenscar); -which is the preferred method of setting the `Ravenscar` profile. +which is the preferred method of setting the ``Ravenscar`` profile. .. _Pragma-Refined_Depends: @@ -5304,7 +5394,7 @@ Syntax: where FUNCTION_RESULT is a function Result attribute_reference -For the semantics of this pragma, see the entry for aspect `Refined_Depends` in +For the semantics of this pragma, see the entry for aspect ``Refined_Depends`` in the SPARK 2014 Reference Manual, section 6.1.5. .. _Pragma-Refined_Global: @@ -5329,7 +5419,7 @@ Syntax: GLOBAL_LIST ::= GLOBAL_ITEM | (GLOBAL_ITEM {, GLOBAL_ITEM}) GLOBAL_ITEM ::= NAME -For the semantics of this pragma, see the entry for aspect `Refined_Global` in +For the semantics of this pragma, see the entry for aspect ``Refined_Global`` in the SPARK 2014 Reference Manual, section 6.1.4. .. _Pragma-Refined_Post: @@ -5343,7 +5433,7 @@ Syntax: pragma Refined_Post (boolean_EXPRESSION); -For the semantics of this pragma, see the entry for aspect `Refined_Post` in +For the semantics of this pragma, see the entry for aspect ``Refined_Post`` in the SPARK 2014 Reference Manual, section 7.2.7. .. _Pragma-Refined_State: @@ -5369,7 +5459,7 @@ Syntax: CONSTITUENT ::= object_NAME | state_NAME -For the semantics of this pragma, see the entry for aspect `Refined_State` in +For the semantics of this pragma, see the entry for aspect ``Refined_State`` in the SPARK 2014 Reference Manual, section 7.2.2. Pragma Relative_Deadline @@ -5405,7 +5495,7 @@ It specifies an exception to the RM rule from E.2.2(17/2), which forbids the use of a remote access to class-wide type as actual for a formal access type. -When this pragma applies to a formal access type `Entity`, that +When this pragma applies to a formal access type ``Entity``, that type is treated as a remote access to class-wide type in the generic. It must be a formal general access type, and its designated type must be the class-wide type of a formal tagged limited private type from the @@ -5452,7 +5542,7 @@ Syntax: This pragma allows a series of restriction identifiers to be specified (the list of allowed identifiers is the same as for -pragma `Restrictions`). For each of these identifiers +pragma ``Restrictions``). For each of these identifiers the compiler checks for violations of the restriction, but generates a warning message rather than an error message if the restriction is violated. @@ -5600,7 +5690,7 @@ Syntax: pragma Secondary_Stack_Size (integer_EXPRESSION); This pragma appears within the task definition of a single task declaration -or a task type declaration (like pragma `Storage_Size`) and applies to all +or a task type declaration (like pragma ``Storage_Size``) and applies to all task objects of that type. The argument specifies the size of the secondary stack to be used by these task objects, and must be of an integer type. The secondary stack is used to handle functions that return a variable-sized @@ -5610,18 +5700,18 @@ Note this pragma only applies to targets using fixed secondary stacks, like VxWorks 653 and bare board targets, where a fixed block for the secondary stack is allocated from the primary stack of the task. By default, these targets assign a percentage of the primary stack for the secondary stack, -as defined by `System.Parameter.Sec_Stack_Percentage`. With this pragma, -an `integer_EXPRESSION` of bytes is assigned from the primary stack instead. +as defined by ``System.Parameter.Sec_Stack_Percentage``. With this pragma, +an ``integer_EXPRESSION`` of bytes is assigned from the primary stack instead. For most targets, the pragma does not apply as the secondary stack grows on demand: allocated as a chain of blocks in the heap. The default size of these -blocks can be modified via the `-D` binder option as described in +blocks can be modified via the :switch:`-D` binder option as described in :title:`GNAT User's Guide`. Note that no check is made to see if the secondary stack can fit inside the primary stack. -Note the pragma cannot appear when the restriction `No_Secondary_Stack` +Note the pragma cannot appear when the restriction ``No_Secondary_Stack`` is in effect. Pragma Share_Generic @@ -5638,7 +5728,7 @@ Syntax: This pragma is provided for compatibility with Dec Ada 83. It has -no effect in `GNAT` (which does not implement shared generics), other +no effect in GNAT (which does not implement shared generics), other than to check that the given names are all names of generic units or generic instances. @@ -5700,14 +5790,14 @@ Syntax: A type can be established as a 'simple storage pool type' by applying -the representation pragma `Simple_Storage_Pool_Type` to the type. +the representation pragma ``Simple_Storage_Pool_Type`` to the type. A type named in the pragma must be a library-level immutably limited record type or limited tagged type declared immediately within a package declaration. The type can also be a limited private type whose full type is allowed as a simple storage pool type. -For a simple storage pool type `SSP`, nonabstract primitive subprograms -`Allocate`, `Deallocate`, and `Storage_Size` can be declared that +For a simple storage pool type ``SSP``, nonabstract primitive subprograms +``Allocate``, ``Deallocate``, and ``Storage_Size`` can be declared that are subtype conformant with the following subprogram declarations: @@ -5729,11 +5819,11 @@ are subtype conformant with the following subprogram declarations: return System.Storage_Elements.Storage_Count; -Procedure `Allocate` must be declared, whereas `Deallocate` and -`Storage_Size` are optional. If `Deallocate` is not declared, then +Procedure ``Allocate`` must be declared, whereas ``Deallocate`` and +``Storage_Size`` are optional. If ``Deallocate`` is not declared, then applying an unchecked deallocation has no effect other than to set its actual -parameter to null. If `Storage_Size` is not declared, then the -`Storage_Size` attribute applied to an access type associated with +parameter to null. If ``Storage_Size`` is not declared, then the +``Storage_Size`` attribute applied to an access type associated with a pool object of type SSP returns zero. Additional operations can be declared for a simple storage pool type (such as for supporting a mark/release storage-management discipline). @@ -5781,12 +5871,12 @@ Use this to override the normal naming convention. It is a configuration pragma, and so has the usual applicability of configuration pragmas (i.e., it applies to either an entire partition, or to all units in a compilation, or to a single unit, depending on how it is used. -`unit_name` is mapped to `file_name_literal`. The identifier for +``unit_name`` is mapped to ``file_name_literal``. The identifier for the second argument is required, and indicates whether this is the file name for the spec or for the body. The optional Index argument should be used when a file contains multiple -units, and when you do not want to use `gnatchop` to separate then +units, and when you do not want to use ``gnatchop`` to separate then into multiple files (which is the recommended procedure to limit the number of recompilations that are needed when some sources change). For instance, if the source file :file:`source.ada` contains @@ -5816,10 +5906,10 @@ you could use the following configuration pragmas: (A, Body_File_Name => "source.ada", Index => 2); -Note that the `gnatname` utility can also be used to generate those +Note that the ``gnatname`` utility can also be used to generate those configuration pragmas. -Another form of the `Source_File_Name` pragma allows +Another form of the ``Source_File_Name`` pragma allows the specification of patterns defining alternative file naming schemes to apply to all files. @@ -5859,8 +5949,8 @@ file naming is controlled by Source_File_Name_Project pragmas, which are usually supplied automatically by the project manager. A pragma Source_File_Name cannot appear after a :ref:`Pragma_Source_File_Name_Project`. -For more details on the use of the `Source_File_Name` pragma, see the -sections on `Using Other File Names` and `Alternative File Naming Schemes' +For more details on the use of the ``Source_File_Name`` pragma, see the +sections on ``Using Other File Names`` and `Alternative File Naming Schemes' in the :title:`GNAT User's Guide`. .. _Pragma_Source_File_Name_Project: @@ -5893,11 +5983,11 @@ Syntax: This pragma must appear as the first line of a source file. -`integer_literal` is the logical line number of the line following +``integer_literal`` is the logical line number of the line following the pragma line (for use in error messages and debugging -information). `string_literal` is a static string constant that +information). ``string_literal`` is a static string constant that specifies the file name to be used in error messages and debugging -information. This is most notably used for the output of `gnatchop` +information. This is most notably used for the output of ``gnatchop`` with the *-r* switch, to make sure that the original unchopped source file is the one referred to. @@ -5938,11 +6028,11 @@ be used in the following places: Immediately within a library-level package body * - Immediately following the `private` keyword of a library-level + Immediately following the ``private`` keyword of a library-level package spec * - Immediately following the `begin` keyword of a library-level + Immediately following the ``begin`` keyword of a library-level package body * @@ -5954,11 +6044,11 @@ that is active at the point it is declared. But this can be overridden by pragma within the spec or body as above. The basic consistency rule is that you can't turn SPARK_Mode back -`On`, once you have explicitly (with a pragma) turned if -`Off`. So the following rules apply: +``On``, once you have explicitly (with a pragma) turned if +``Off``. So the following rules apply: -If a subprogram spec has SPARK_Mode `Off`, then the body must -also have SPARK_Mode `Off`. +If a subprogram spec has SPARK_Mode ``Off``, then the body must +also have SPARK_Mode ``Off``. For a package, we have four parts: @@ -5969,15 +6059,15 @@ For a package, we have four parts: * the body of the package * - the elaboration code after `begin` + the elaboration code after ``begin`` For a package, the rule is that if you explicitly turn SPARK_Mode -`Off` for any part, then all the following parts must have -SPARK_Mode `Off`. Note that this may require repeating a pragma -SPARK_Mode (`Off`) in the body. For example, if we have a -configuration pragma SPARK_Mode (`On`) that turns the mode on by +``Off`` for any part, then all the following parts must have +SPARK_Mode ``Off``. Note that this may require repeating a pragma +SPARK_Mode (``Off``) in the body. For example, if we have a +configuration pragma SPARK_Mode (``On``) that turns the mode on by default everywhere, and one particular package spec has pragma -SPARK_Mode (`Off`), then that pragma will need to be repeated in +SPARK_Mode (``Off``), then that pragma will need to be repeated in the package body. Pragma Static_Elaboration_Desired @@ -6032,13 +6122,13 @@ of this type. It must name a function whose argument type may be any subtype, and whose returned type must be the type given as the first argument to the pragma. -The meaning of the `Read` parameter is that if a stream attribute directly +The meaning of the ``Read`` parameter is that if a stream attribute directly or indirectly specifies reading of the type given as the first parameter, then a value of the type given as the argument to the Read function is read from the stream, and then the Read function is used to convert this to the required target type. -Similarly the `Write` parameter specifies how to treat write attributes +Similarly the ``Write`` parameter specifies how to treat write attributes that directly or indirectly apply to the type given as the first parameter. It must have an input parameter of the type specified by the first parameter, and the return type must be the same as the input type of the Read function. @@ -6075,12 +6165,12 @@ Reference Manual are: The effect is that if the value of an unbounded string is written to a stream, then the representation of the item in the stream is in the same format that -would be used for `Standard.String'Output`, and this same representation +would be used for ``Standard.String'Output``, and this same representation is expected when a value of this type is read from the stream. Note that the value written always includes the bounds, even for Unbounded_String'Write, since Unbounded_String is not an array type. -Note that the `Stream_Convert` pragma is not effective in the case of +Note that the ``Stream_Convert`` pragma is not effective in the case of a derived type of a non-limited tagged type. If such a type is specified then the pragma is silently ignored, and the default implementation of the stream attributes is used instead. @@ -6126,15 +6216,15 @@ layout checking: gcc -c -gnatyl ... -The form ALL_CHECKS activates all standard checks (its use is equivalent -to the use of the `gnaty` switch with no options. +The form ``ALL_CHECKS`` activates all standard checks (its use is equivalent +to the use of the :switch:`gnaty` switch with no options. See the :title:`GNAT User's Guide` for details.) -Note: the behavior is slightly different in GNAT mode (*-gnatg* used). -In this case, ALL_CHECKS implies the standard set of GNAT mode style check -options (i.e. equivalent to *-gnatyg*). +Note: the behavior is slightly different in GNAT mode (:switch:`-gnatg` used). +In this case, ``ALL_CHECKS`` implies the standard set of GNAT mode style check +options (i.e. equivalent to :switch:`-gnatyg`). -The forms with `Off` and `On` +The forms with ``Off`` and ``On`` can be used to temporarily disable style checks as shown in the following example: @@ -6149,7 +6239,7 @@ as shown in the following example: Finally the two argument form is allowed only if the first argument is -`On` or `Off`. The effect is to turn of semantic style checks +``On`` or ``Off``. The effect is to turn of semantic style checks for the specified entity, as shown in the following example: @@ -6193,46 +6283,46 @@ names that are implementation defined (as permitted by the RM): * - `Alignment_Check` can be used to suppress alignment checks + ``Alignment_Check`` can be used to suppress alignment checks on addresses used in address clauses. Such checks can also be suppressed - by suppressing range checks, but the specific use of `Alignment_Check` + by suppressing range checks, but the specific use of ``Alignment_Check`` allows suppression of alignment checks without suppressing other range checks. - Note that `Alignment_Check` is suppressed by default on machines (such as + Note that ``Alignment_Check`` is suppressed by default on machines (such as the x86) with non-strict alignment. * - `Atomic_Synchronization` can be used to suppress the special memory + ``Atomic_Synchronization`` can be used to suppress the special memory synchronization instructions that are normally generated for access to - `Atomic` variables to ensure correct synchronization between tasks + ``Atomic`` variables to ensure correct synchronization between tasks that use such variables for synchronization purposes. * - `Duplicated_Tag_Check` Can be used to suppress the check that is generated + ``Duplicated_Tag_Check`` Can be used to suppress the check that is generated for a duplicated tag value when a tagged type is declared. * - `Container_Checks` Can be used to suppress all checks within Ada.Containers + ``Container_Checks`` Can be used to suppress all checks within Ada.Containers and instances of its children, including Tampering_Check. * - `Tampering_Check` Can be used to suppress tampering check in the containers. + ``Tampering_Check`` Can be used to suppress tampering check in the containers. * - `Predicate_Check` can be used to control whether predicate checks are + ``Predicate_Check`` can be used to control whether predicate checks are active. It is applicable only to predicates for which the policy is - `Check`. Unlike `Assertion_Policy`, which determines if a given + ``Check``. Unlike ``Assertion_Policy``, which determines if a given predicate is ignored or checked for the whole program, the use of - `Suppress` and `Unsuppress` with this check name allows a given + ``Suppress`` and ``Unsuppress`` with this check name allows a given predicate to be turned on and off at specific points in the program. * - `Validity_Check` can be used specifically to control validity checks. - If `Suppress` is used to suppress validity checks, then no validity + ``Validity_Check`` can be used specifically to control validity checks. + If ``Suppress`` is used to suppress validity checks, then no validity checks are performed, including those specified by the appropriate compiler - switch or the `Validity_Checks` pragma. + switch or the ``Validity_Checks`` pragma. * - Additional check names previously introduced by use of the `Check_Name` + Additional check names previously introduced by use of the ``Check_Name`` pragma are also allowed. @@ -6259,11 +6349,11 @@ Syntax: This pragma can appear anywhere within a unit. -The effect is to apply `Suppress (All_Checks)` to the unit +The effect is to apply ``Suppress (All_Checks)`` to the unit in which it appears. This pragma is implemented for compatibility with DEC Ada 83 usage where it appears at the end of a unit, and for compatibility with Rational Ada, where it appears as a program unit pragma. -The use of the standard Ada pragma `Suppress (All_Checks)` +The use of the standard Ada pragma ``Suppress (All_Checks)`` as a normal configuration pragma is the preferred usage in GNAT. .. _Pragma-Suppress_Debug_Info: @@ -6298,7 +6388,7 @@ In normal mode, a raise statement for an exception by default generates an exception message giving the file name and line number for the location of the raise. This is useful for debugging and logging purposes, but this entails extra space for the strings for the messages. The configuration -pragma `Suppress_Exception_Locations` can be used to suppress the +pragma ``Suppress_Exception_Locations`` can be used to suppress the generation of these strings, with the result that space is saved, but the exception message for such raises is null. This configuration pragma may appear in a global configuration pragma file, or in a specific unit as @@ -6363,7 +6453,7 @@ Syntax This pragma appears within a task definition (like pragma -`Priority`) and applies to the task in which it appears. The +``Priority``) and applies to the task in which it appears. The argument must be of type String, and provides a name to be used for the task instance when the task is created. Note that this expression is not required to be static, and in particular, it can contain @@ -6373,7 +6463,7 @@ as illustrated in the example below. The task name is recorded internally in the run-time structures and is accessible to tools like the debugger. In addition the -routine `Ada.Task_Identification.Image` will return this +routine ``Ada.Task_Identification.Image`` will return this string, with a unique task address appended. @@ -6425,7 +6515,7 @@ This pragma specifies the length of the guard area for tasks. The guard area is an additional storage area allocated to a task. A value of zero means that either no guard area is created or a minimal guard area is created, depending on the target. This pragma can appear anywhere a -`Storage_Size` attribute definition clause is allowed for a task +``Storage_Size`` attribute definition clause is allowed for a task type. .. _Pragma-Test_Case: @@ -6447,23 +6537,23 @@ Syntax: [, Ensures => Boolean_Expression]); -The `Test_Case` pragma allows defining fine-grain specifications +The ``Test_Case`` pragma allows defining fine-grain specifications for use by testing tools. -The compiler checks the validity of the `Test_Case` pragma, but its +The compiler checks the validity of the ``Test_Case`` pragma, but its presence does not lead to any modification of the code generated by the compiler. -`Test_Case` pragmas may only appear immediately following the +``Test_Case`` pragmas may only appear immediately following the (separate) declaration of a subprogram in a package declaration, inside a package spec unit. Only other pragmas may intervene (that is appear between the subprogram declaration and a test case). -The compiler checks that boolean expressions given in `Requires` and -`Ensures` are valid, where the rules for `Requires` are the -same as the rule for an expression in `Precondition` and the rules -for `Ensures` are the same as the rule for an expression in -`Postcondition`. In particular, attributes `'Old` and -`'Result` can only be used within the `Ensures` +The compiler checks that boolean expressions given in ``Requires`` and +``Ensures`` are valid, where the rules for ``Requires`` are the +same as the rule for an expression in ``Precondition`` and the rules +for ``Ensures`` are the same as the rule for an expression in +``Postcondition``. In particular, attributes ``'Old`` and +``'Result`` can only be used within the ``Ensures`` expression. The following is an example of use within a package spec: @@ -6481,11 +6571,11 @@ expression. The following is an example of use within a package spec: The meaning of a test case is that there is at least one context where -`Requires` holds such that, if the associated subprogram is executed in -that context, then `Ensures` holds when the subprogram returns. -Mode `Nominal` indicates that the input context should also satisfy the +``Requires`` holds such that, if the associated subprogram is executed in +that context, then ``Ensures`` holds when the subprogram returns. +Mode ``Nominal`` indicates that the input context should also satisfy the precondition of the subprogram, and the output context should also satisfy its -postcondition. Mode `Robustness` indicates that the precondition and +postcondition. Mode ``Robustness`` indicates that the precondition and postcondition of the subprogram should be ignored for this test case. .. _Pragma-Thread_Local_Storage: @@ -6507,20 +6597,20 @@ Syntax: This pragma specifies that the specified entity, which must be -a variable declared in a library level package, is to be marked as -"Thread Local Storage" (`TLS`). On systems supporting this (which +a variable declared in a library-level package, is to be marked as +"Thread Local Storage" (``TLS``). On systems supporting this (which include Windows, Solaris, GNU/Linux and VxWorks 6), this causes each thread (and hence each Ada task) to see a distinct copy of the variable. The variable may not have default initialization, and if there is -an explicit initialization, it must be either `null` for an +an explicit initialization, it must be either ``null`` for an access variable, or a static expression for a scalar variable. This provides a low level mechanism similar to that provided by -the `Ada.Task_Attributes` package, but much more efficient +the ``Ada.Task_Attributes`` package, but much more efficient and is also useful in writing interface code that will interact with foreign threads. -If this pragma is used on a system where `TLS` is not supported, +If this pragma is used on a system where ``TLS`` is not supported, then an error message will be generated and the program will be rejected. Pragma Time_Slice @@ -6577,13 +6667,13 @@ Syntax: [Check =>] EXPRESSION); -The `Type_Invariant` pragma is intended to be an exact -replacement for the language-defined `Type_Invariant` +The ``Type_Invariant`` pragma is intended to be an exact +replacement for the language-defined ``Type_Invariant`` aspect, and shares its restrictions and semantics. It differs -from the language defined `Invariant` pragma in that it +from the language defined ``Invariant`` pragma in that it does not permit a string parameter, and it is -controlled by the assertion identifier `Type_Invariant` -rather than `Invariant`. +controlled by the assertion identifier ``Type_Invariant`` +rather than ``Invariant``. .. _Pragma-Type_Invariant_Class: @@ -6600,19 +6690,19 @@ Syntax: [Check =>] EXPRESSION); -The `Type_Invariant_Class` pragma is intended to be an exact -replacement for the language-defined `Type_Invariant'Class` +The ``Type_Invariant_Class`` pragma is intended to be an exact +replacement for the language-defined ``Type_Invariant'Class`` aspect, and shares its restrictions and semantics. -Note: This pragma is called `Type_Invariant_Class` rather than -`Type_Invariant'Class` because the latter would not be strictly +Note: This pragma is called ``Type_Invariant_Class`` rather than +``Type_Invariant'Class`` because the latter would not be strictly conforming to the allowed syntax for pragmas. The motivation for providing pragmas equivalent to the aspects is to allow a program to be written using the pragmas, and then compiled if necessary using an Ada compiler that does not recognize the pragmas or aspects, but is prepared to ignore the pragmas. The assertion -policy that controls this pragma is `Type_Invariant'Class`, -not `Type_Invariant_Class`. +policy that controls this pragma is ``Type_Invariant'Class``, +not ``Type_Invariant_Class``. Pragma Unchecked_Union ====================== @@ -6679,11 +6769,11 @@ on entry even though the value would not be actually used. Although the rule guarantees against this possibility, it is sometimes too restrictive. For example if we know that the string has a lower bound of 1, then we will never raise an exception. -The pragma `Unevaluated_Use_Of_Old` can be -used to modify this behavior. If the argument is `Error` then an +The pragma ``Unevaluated_Use_Of_Old`` can be +used to modify this behavior. If the argument is ``Error`` then an error is given (this is the default RM behavior). If the argument is -`Warn` then the usage is allowed as legal but with a warning -that an exception might be raised. If the argument is `Allow` +``Warn`` then the usage is allowed as legal but with a warning +that an exception might be raised. If the argument is ``Allow`` then the usage is allowed as legal without generating a warning. This pragma may appear as a configuration pragma, or in a declarative @@ -6704,7 +6794,7 @@ Syntax: If this pragma occurs in a unit that is processed by the compiler, GNAT aborts with the message :samp:`xxx not implemented`, where -`xxx` is the name of the current compilation unit. This pragma is +``xxx`` is the name of the current compilation unit. This pragma is intended to allow the compiler to handle unimplemented library units in a clean manner. @@ -6724,13 +6814,13 @@ Syntax: pragma Universal_Aliasing [([Entity =>] type_LOCAL_NAME)]; -`type_LOCAL_NAME` must refer to a type declaration in the current +``type_LOCAL_NAME`` must refer to a type declaration in the current declarative part. The effect is to inhibit strict type-based aliasing optimization for the given type. In other words, the effect is as though access types designating this type were subject to pragma No_Strict_Aliasing. For a detailed description of the strict aliasing optimization, and the situations in which it must be suppressed, see the section on -`Optimization and Strict Aliasing` in the :title:`GNAT User's Guide`. +``Optimization and Strict Aliasing`` in the :title:`GNAT User's Guide`. .. _Pragma-Universal_Data: @@ -6773,7 +6863,7 @@ Syntax: This pragma signals that the assignable entities (variables, -`out` parameters, `in out` parameters) whose names are listed are +``out`` parameters, ``in out`` parameters) whose names are listed are deliberately not assigned in the current source unit. This suppresses warnings about the entities being referenced but not assigned, and in addition a warning will be @@ -6787,9 +6877,9 @@ be. For the variable case, warnings are never given for unreferenced variables whose name contains one of the substrings -`DISCARD, DUMMY, IGNORE, JUNK, UNUSED` in any casing. Such names +``DISCARD, DUMMY, IGNORE, JUNK, UNUSED`` in any casing. Such names are typically to be used in cases where such warnings are expected. -Thus it is never necessary to use `pragma Unmodified` for such +Thus it is never necessary to use ``pragma Unmodified`` for such variables, though it is harmless to do so. .. _Pragma-Unreferenced: @@ -6822,10 +6912,10 @@ and that this is deliberate. It can also be useful in the case of objects declared only for their initialization or finalization side effects. -If `LOCAL_NAME` identifies more than one matching homonym in the +If ``LOCAL_NAME`` identifies more than one matching homonym in the current scope, then the entity most recently declared is the one to which the pragma applies. Note that in the case of accept formals, the pragma -Unreferenced may appear immediately after the keyword `do` which +Unreferenced may appear immediately after the keyword ``do`` which allows the indication of whether or not accept formals are referenced or not to be given individually for each accept statement. @@ -6839,17 +6929,17 @@ declaration, then this pragma should not be used (calls from another unit would not be flagged); pragma Obsolescent can be used instead for this purpose, see :ref:`Pragma_Obsolescent`. -The second form of pragma `Unreferenced` is used within a context +The second form of pragma ``Unreferenced`` is used within a context clause. In this case the arguments must be unit names of units previously -mentioned in `with` clauses (similar to the usage of pragma -`Elaborate_All`. The effect is to suppress warnings about unreferenced +mentioned in ``with`` clauses (similar to the usage of pragma +``Elaborate_All``. The effect is to suppress warnings about unreferenced units and unreferenced entities within these units. For the variable case, warnings are never given for unreferenced variables whose name contains one of the substrings -`DISCARD, DUMMY, IGNORE, JUNK, UNUSED` in any casing. Such names +``DISCARD, DUMMY, IGNORE, JUNK, UNUSED`` in any casing. Such names are typically to be used in cases where such warnings are expected. -Thus it is never necessary to use `pragma Unreferenced` for such +Thus it is never necessary to use ``pragma Unreferenced`` for such variables, though it is harmless to do so. .. _Pragma-Unreferenced_Objects: @@ -6890,28 +6980,28 @@ Syntax: Normally certain interrupts are reserved to the implementation. Any attempt to attach an interrupt causes Program_Error to be raised, as described in -RM C.3.2(22). A typical example is the `SIGINT` interrupt used in +RM C.3.2(22). A typical example is the ``SIGINT`` interrupt used in many systems for a :kbd:`Ctrl-C` interrupt. Normally this interrupt is reserved to the implementation, so that :kbd:`Ctrl-C` can be used to interrupt execution. -If the pragma `Unreserve_All_Interrupts` appears anywhere in any unit in +If the pragma ``Unreserve_All_Interrupts`` appears anywhere in any unit in a program, then all such interrupts are unreserved. This allows the program to handle these interrupts, but disables their standard functions. For example, if this pragma is used, then pressing :kbd:`Ctrl-C` will not automatically interrupt execution. However, -a program can then handle the `SIGINT` interrupt as it chooses. +a program can then handle the ``SIGINT`` interrupt as it chooses. For a full list of the interrupts handled in a specific implementation, -see the source code for the spec of `Ada.Interrupts.Names` in +see the source code for the spec of ``Ada.Interrupts.Names`` in file :file:`a-intnam.ads`. This is a target dependent file that contains the list of interrupts recognized for a given target. The documentation in this file also specifies what interrupts are affected by the use of -the `Unreserve_All_Interrupts` pragma. +the ``Unreserve_All_Interrupts`` pragma. For a more general facility for controlling what interrupts can be -handled, see pragma `Interrupt_State`, which subsumes the functionality -of the `Unreserve_All_Interrupts` pragma. +handled, see pragma ``Interrupt_State``, which subsumes the functionality +of the ``Unreserve_All_Interrupts`` pragma. Pragma Unsuppress ================= @@ -6924,11 +7014,11 @@ Syntax: pragma Unsuppress (IDENTIFIER [, [On =>] NAME]); -This pragma undoes the effect of a previous pragma `Suppress`. If -there is no corresponding pragma `Suppress` in effect, it has no +This pragma undoes the effect of a previous pragma ``Suppress``. If +there is no corresponding pragma ``Suppress`` in effect, it has no effect. The range of the effect is the same as for pragma -`Suppress`. The meaning of the arguments is identical to that used -in pragma `Suppress`. +``Suppress``. The meaning of the arguments is identical to that used +in pragma ``Suppress``. One important application is to ensure that checks are on in cases where code depends on the checks for its correct functioning, so that the code @@ -6949,7 +7039,7 @@ of Ada as an implementation-defined pragma. Note that in addition to the checks defined in the Ada RM, GNAT recogizes a number of implementation-defined check names. See the description of pragma -`Suppress` for full details. +``Suppress`` for full details. Pragma Use_VADS_Size ==================== @@ -6989,7 +7079,7 @@ Syntax: This pragma signals that the assignable entities (variables, -`out` parameters, and `in out` parameters) whose names are listed +``out`` parameters, and ``in out`` parameters) whose names are listed deliberately do not get assigned or referenced in the current source unit after the occurrence of the pragma in the current source unit. This suppresses warnings about the entities that are unreferenced and/or not @@ -7003,9 +7093,9 @@ that it might be. For the variable case, warnings are never given for unreferenced variables whose name contains one of the substrings -`DISCARD, DUMMY, IGNORE, JUNK, UNUSED` in any casing. Such names +``DISCARD, DUMMY, IGNORE, JUNK, UNUSED`` in any casing. Such names are typically to be used in cases where such warnings are expected. -Thus it is never necessary to use `pragma Unmodified` for such +Thus it is never necessary to use ``pragma Unmodified`` for such variables, though it is harmless to do so. Pragma Validity_Checks @@ -7033,8 +7123,8 @@ reference manual settings, and then a string of letters in the string specifies the exact set of options required. The form of this string is exactly as described for the *-gnatVx* compiler switch (see the GNAT User's Guide for details). For example the following two -methods can be used to enable validity checking for mode `in` and -`in out` subprogram parameters: +methods can be used to enable validity checking for mode ``in`` and +``in out`` subprogram parameters: * @@ -7051,9 +7141,9 @@ methods can be used to enable validity checking for mode `in` and The form ALL_CHECKS activates all standard checks (its use is equivalent -to the use of the `gnatva` switch. +to the use of the :switch:`gnatva` switch. -The forms with `Off` and `On` +The forms with ``Off`` and ``On`` can be used to temporarily disable validity checks as shown in the following example: @@ -7106,18 +7196,18 @@ write all the bits of the object. The intention is that this be suitable for use with memory-mapped I/O devices on some machines. Note that there are two important respects in which this is -different from `pragma Atomic`. First a reference to a `Volatile_Full_Access` +different from ``pragma Atomic``. First a reference to a ``Volatile_Full_Access`` object is not a sequential action in the RM 9.10 sense and, therefore, does -not create a synchronization point. Second, in the case of `pragma Atomic`, +not create a synchronization point. Second, in the case of ``pragma Atomic``, there is no guarantee that all the bits will be accessed if the reference is not to the whole object; the compiler is allowed (and generally will) access only part of the object in this case. -It is not permissible to specify `Atomic` and `Volatile_Full_Access` for +It is not permissible to specify ``Atomic`` and ``Volatile_Full_Access`` for the same object. -It is not permissible to specify `Volatile_Full_Access` for a composite -(record or array) type or object that has at least one `Aliased` component. +It is not permissible to specify ``Volatile_Full_Access`` for a composite +(record or array) type or object that has at least one ``Aliased`` component. .. _Pragma-Volatile_Function: @@ -7130,7 +7220,7 @@ Syntax: pragma Volatile_Function [ (boolean_EXPRESSION) ]; -For the semantics of this pragma, see the entry for aspect `Volatile_Function` +For the semantics of this pragma, see the entry for aspect ``Volatile_Function`` in the SPARK 2014 Reference Manual, section 7.1.2. Pragma Warning_As_Error @@ -7152,8 +7242,8 @@ which treats all warnings as errors. The pattern may contain asterisks, which match zero or more characters in the message. For example, you can use -`pragma Warning_As_Error ("bits of*unused")` to treat the warning -message `warning: 960 bits of "a" unused` as an error. No other regular +``pragma Warning_As_Error ("bits of*unused")`` to treat the warning +message ``warning: 960 bits of "a" unused`` as an error. No other regular expression notations are permitted. All characters other than asterisk in these three specific cases are treated as literal characters in the match. The match is case insensitive, for example XYZ matches xyz. @@ -7246,41 +7336,41 @@ Syntax: Note: in Ada 83 mode, a string literal may be used in place of a static string expression (which does not exist in Ada 83). -Note if the second argument of `DETAILS` is a `local_NAME` then the +Note if the second argument of ``DETAILS`` is a ``local_NAME`` then the second form is always understood. If the intention is to use -the fourth form, then you can write `NAME & ""` to force the -intepretation as a `static_string_EXPRESSION`. +the fourth form, then you can write ``NAME & ""`` to force the +intepretation as a *static_string_EXPRESSION*. -Note: if the first argument is a valid `TOOL_NAME`, it will be interpreted -that way. The use of the `TOOL_NAME` argument is relevant only to users +Note: if the first argument is a valid ``TOOL_NAME``, it will be interpreted +that way. The use of the ``TOOL_NAME`` argument is relevant only to users of SPARK and GNATprove, see last part of this section for details. Normally warnings are enabled, with the output being controlled by -the command line switch. Warnings (`Off`) turns off generation of -warnings until a Warnings (`On`) is encountered or the end of the +the command line switch. Warnings (``Off``) turns off generation of +warnings until a Warnings (``On``) is encountered or the end of the current unit. If generation of warnings is turned off using this pragma, then some or all of the warning messages are suppressed, regardless of the setting of the command line switches. -The `Reason` parameter may optionally appear as the last argument +The ``Reason`` parameter may optionally appear as the last argument in any of the forms of this pragma. It is intended purely for the -purposes of documenting the reason for the `Warnings` pragma. +purposes of documenting the reason for the ``Warnings`` pragma. The compiler will check that the argument is a static string but otherwise ignore this argument. Other tools may provide specialized processing for this string. The form with a single argument (or two arguments if Reason present), -where the first argument is `ON` or `OFF` +where the first argument is ``ON`` or ``OFF`` may be used as a configuration pragma. -If the `LOCAL_NAME` parameter is present, warnings are suppressed for +If the ``LOCAL_NAME`` parameter is present, warnings are suppressed for the specified entity. This suppression is effective from the point where it occurs till the end of the extended scope of the variable (similar to -the scope of `Suppress`). This form cannot be used as a configuration +the scope of ``Suppress``). This form cannot be used as a configuration pragma. -In the case where the first argument is other than `ON` or -`OFF`, +In the case where the first argument is other than ``ON`` or +``OFF``, the third form with a single static_string_EXPRESSION argument (and possible reason) provides more precise control over which warnings are active. The string is a list of letters @@ -7289,35 +7379,35 @@ code for these letters is the same as the string used in the command line switch controlling warnings. For a brief summary, use the gnatmake command with no arguments, which will generate usage information containing the list of warnings switches supported. For -full details see the section on `Warning Message Control` in the +full details see the section on ``Warning Message Control`` in the :title:`GNAT User's Guide`. This form can also be used as a configuration pragma. -The warnings controlled by the *-gnatw* switch are generated by the +The warnings controlled by the :switch:`-gnatw` switch are generated by the front end of the compiler. The GCC back end can provide additional warnings -and they are controlled by the *-W* switch. Such warnings can be -identified by the appearance of a string of the form `[-Wxxx]` in the -message which designates the *-Wxxx* switch that controls the message. -The form with a single static_string_EXPRESSION argument also works for these -warnings, but the string must be a single full *-Wxxx* switch in this +and they are controlled by the :switch:`-W` switch. Such warnings can be +identified by the appearance of a string of the form ``[-W{xxx}]`` in the +message which designates the :switch:`-W{xxx}` switch that controls the message. +The form with a single *static_string_EXPRESSION* argument also works for these +warnings, but the string must be a single full :switch:`-W{xxx}` switch in this case. The above reference lists a few examples of these additional warnings. The specified warnings will be in effect until the end of the program -or another pragma Warnings is encountered. The effect of the pragma is +or another pragma ``Warnings`` is encountered. The effect of the pragma is cumulative. Initially the set of warnings is the standard default set as possibly modified by compiler switches. Then each pragma Warning modifies this set of warnings as specified. This form of the pragma may also be used as a configuration pragma. -The fourth form, with an `On|Off` parameter and a string, is used to +The fourth form, with an ``On|Off`` parameter and a string, is used to control individual messages, based on their text. The string argument is a pattern that is used to match against the text of individual warning messages (not including the initial "warning: " tag). The pattern may contain asterisks, which match zero or more characters in the message. For example, you can use -`pragma Warnings (Off, "bits of*unused")` to suppress the warning -message `warning: 960 bits of "a" unused`. No other regular +``pragma Warnings (Off, "bits of*unused")`` to suppress the warning +message ``warning: 960 bits of "a" unused``. No other regular expression notations are permitted. All characters other than asterisk in these three specific cases are treated as literal characters in the match. The match is case insensitive, for example XYZ matches xyz. @@ -7329,7 +7419,7 @@ the end of the message, since this is implied). The above use of patterns to match the message applies only to warning messages generated by the front end. This form of the pragma with a string argument can also be used to control warnings provided by the back end and -mentioned above. By using a single full *-Wxxx* switch in the pragma, +mentioned above. By using a single full :switch:`-W{xxx}` switch in the pragma, such warnings can be turned on and off. There are two ways to use the pragma in this form. The OFF form can be used @@ -7353,13 +7443,13 @@ pragmas, and (if *-gnatw.w* is given) at least one matching warning must be suppressed. Note: to write a string that will match any warning, use the string -`"***"`. It will not work to use a single asterisk or two +``"***"``. It will not work to use a single asterisk or two asterisks since this looks like an operator name. This form with three -asterisks is similar in effect to specifying `pragma Warnings (Off)` except (if *-gnatw.w* is given) that a matching -`pragma Warnings (On, "***")` will be required. This can be +asterisks is similar in effect to specifying ``pragma Warnings (Off)`` except (if :switch:`-gnatw.w` is given) that a matching +``pragma Warnings (On, "***")`` will be required. This can be helpful in avoiding forgetting to turn warnings back on. -Note: the debug flag -gnatd.i (`/NOWARNINGS_PRAGMAS` in VMS) can be +Note: the debug flag :switch:`-gnatd.i` (``/NOWARNINGS_PRAGMAS`` in VMS) can be used to cause the compiler to entirely ignore all WARNINGS pragmas. This can be useful in checking whether obsolete pragmas in existing programs are hiding real problems. @@ -7368,14 +7458,14 @@ Note: pragma Warnings does not affect the processing of style messages. See separate entry for pragma Style_Checks for control of style messages. Users of the formal verification tool GNATprove for the SPARK subset of Ada may -use the version of the pragma with a `TOOL_NAME` parameter. +use the version of the pragma with a ``TOOL_NAME`` parameter. -If present, `TOOL_NAME` is the name of a tool, currently either `GNAT` for the -compiler or `GNATprove` for the formal verification tool. A given tool only +If present, ``TOOL_NAME`` is the name of a tool, currently either ``GNAT`` for the +compiler or ``GNATprove`` for the formal verification tool. A given tool only takes into account pragma Warnings that do not specify a tool name, or that specify the matching tool name. This makes it possible to disable warnings selectively for each tool, and as a consequence to detect useless pragma -Warnings with switch `-gnatw.w`. +Warnings with switch :switch:`-gnatw.w`. Pragma Weak_External ==================== @@ -7388,10 +7478,10 @@ Syntax: pragma Weak_External ([Entity =>] LOCAL_NAME); -`LOCAL_NAME` must refer to an object that is declared at the library +``LOCAL_NAME`` must refer to an object that is declared at the library level. This pragma specifies that the given entity should be marked as a -weak symbol for the linker. It is equivalent to `__attribute__((weak))` -in GNU C and causes `LOCAL_NAME` to be emitted as a weak symbol instead +weak symbol for the linker. It is equivalent to ``__attribute__((weak))`` +in GNU C and causes ``LOCAL_NAME`` to be emitted as a weak symbol instead of a regular symbol, that is to say a symbol that does not have to be resolved by the linker if used in conjunction with a pragma Import. @@ -7452,8 +7542,8 @@ wide character, because then the previous encoding will still be in effect, causing "illegal character" errors. The argument can be an identifier or a character literal. In the identifier -case, it is one of `HEX`, `UPPER`, `SHIFT_JIS`, -`EUC`, `UTF8`, or `BRACKETS`. In the character literal +case, it is one of ``HEX``, ``UPPER``, ``SHIFT_JIS``, +``EUC``, ``UTF8``, or ``BRACKETS``. In the character literal case it is correspondingly one of the characters :kbd:`h`, :kbd:`u`, :kbd:`s`, :kbd:`e`, :kbd:`8`, or :kbd:`b`. diff --git a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst index 22ef54a..2825362c 100644 --- a/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst +++ b/gcc/ada/doc/gnat_rm/implementation_of_ada_2012_features.rst @@ -19,7 +19,7 @@ implemented. Generally, these features are only available if the *-gnat12* (Ada 2012 features enabled) option is set, which is the default behavior, -or if the configuration pragma `Ada_2012` is used. +or if the configuration pragma ``Ada_2012`` is used. However, new pragmas, attributes, and restrictions are unconditionally available, since the Ada 95 standard allows the addition of @@ -88,7 +88,7 @@ http://www.ada-auth.org/ai05-summary.html. * *AI-0163 Pragmas in place of null (2010-07-01)* A statement sequence may be composed entirely of pragmas. It is no longer - necessary to add a dummy `null` statement to make the sequence legal. + necessary to add a dummy ``null`` statement to make the sequence legal. RM References: 2.08 (7) 2.08 (16) @@ -109,58 +109,58 @@ http://www.ada-auth.org/ai05-summary.html. forms of declarations listed in the AI are supported. The following is a list of the aspects supported (with GNAT implementation aspects marked) -================================== =========== -Supported Aspect Source -================================== =========== - `Ada_2005` -- GNAT - `Ada_2012` -- GNAT - `Address` - `Alignment` - `Atomic` - `Atomic_Components` - `Bit_Order` - `Component_Size` - `Contract_Cases` -- GNAT - `Discard_Names` - `External_Tag` - `Favor_Top_Level` -- GNAT - `Inline` - `Inline_Always` -- GNAT - `Invariant` -- GNAT - `Machine_Radix` - `No_Return` - `Object_Size` -- GNAT - `Pack` - `Persistent_BSS` -- GNAT - `Post` - `Pre` - `Predicate` - `Preelaborable_Initialization` - `Pure_Function` -- GNAT - `Remote_Access_Type` -- GNAT - `Shared` -- GNAT - `Size` - `Storage_Pool` - `Storage_Size` - `Stream_Size` - `Suppress` - `Suppress_Debug_Info` -- GNAT - `Test_Case` -- GNAT - `Thread_Local_Storage` -- GNAT - `Type_Invariant` - `Unchecked_Union` - `Universal_Aliasing` -- GNAT - `Unmodified` -- GNAT - `Unreferenced` -- GNAT - `Unreferenced_Objects` -- GNAT - `Unsuppress` - `Value_Size` -- GNAT - `Volatile` - `Volatile_Components` - `Warnings` -- GNAT -================================== =========== - - Note that for aspects with an expression, e.g. `Size`, the expression is +==================================== =========== +Supported Aspect Source +==================================== =========== + ``Ada_2005`` -- GNAT + ``Ada_2012`` -- GNAT + ``Address`` + ``Alignment`` + ``Atomic`` + ``Atomic_Components`` + ``Bit_Order`` + ``Component_Size`` + ``Contract_Cases`` -- GNAT + ``Discard_Names`` + ``External_Tag`` + ``Favor_Top_Level`` -- GNAT + ``Inline`` + ``Inline_Always`` -- GNAT + ``Invariant`` -- GNAT + ``Machine_Radix`` + ``No_Return`` + ``Object_Size`` -- GNAT + ``Pack`` + ``Persistent_BSS`` -- GNAT + ``Post`` + ``Pre`` + ``Predicate`` + ``Preelaborable_Initialization`` + ``Pure_Function`` -- GNAT + ``Remote_Access_Type`` -- GNAT + ``Shared`` -- GNAT + ``Size`` + ``Storage_Pool`` + ``Storage_Size`` + ``Stream_Size`` + ``Suppress`` + ``Suppress_Debug_Info`` -- GNAT + ``Test_Case`` -- GNAT + ``Thread_Local_Storage`` -- GNAT + ``Type_Invariant`` + ``Unchecked_Union`` + ``Universal_Aliasing`` -- GNAT + ``Unmodified`` -- GNAT + ``Unreferenced`` -- GNAT + ``Unreferenced_Objects`` -- GNAT + ``Unsuppress`` + ``Value_Size`` -- GNAT + ``Volatile`` + ``Volatile_Components`` + ``Warnings`` -- GNAT +==================================== =========== + + Note that for aspects with an expression, e.g. ``Size``, the expression is treated like a default expression (visibility is analyzed at the point of occurrence of the aspect, but evaluation of the expression occurs at the freeze point of the entity involved). @@ -188,7 +188,7 @@ Supported Aspect Source * *AI-0003 Qualified expressions as names (2010-07-11)* In Ada 2012, a qualified expression is considered to be syntactically a name, - meaning that constructs such as `A'(F(X)).B` are now legal. This is + meaning that constructs such as ``A'(F(X)).B`` are now legal. This is useful in disambiguating some cases of overloading. RM References: 3.03 (11) 3.03 (21) 4.01 (2) 4.04 (7) 4.07 (3) @@ -211,7 +211,7 @@ Supported Aspect Source The wording in the RM implied that if you have a general access to a constrained object, it could be used to modify the discriminants. This was - obviously not intended. `Constraint_Error` should be raised, and GNAT + obviously not intended. ``Constraint_Error`` should be raised, and GNAT has always done so in this situation. RM References: 3.03 (23) 3.10.02 (26/2) 4.01 (9) 6.04.01 (17) 8.05.01 (5/2) @@ -242,8 +242,8 @@ Supported Aspect Source * *AI-0181 Soft hyphen is a non-graphic character (2010-07-23)* From Ada 2005 on, soft hyphen is considered a non-graphic character, which - means that it has a special name (`SOFT_HYPHEN`) in conjunction with the - `Image` and `Value` attributes for the character types. Strictly + means that it has a special name (``SOFT_HYPHEN``) in conjunction with the + ``Image`` and ``Value`` attributes for the character types. Strictly speaking this is an inconsistency with Ada 95, but in practice the use of these attributes is so obscure that it will not cause problems. @@ -251,13 +251,13 @@ Supported Aspect Source .. index:: AI-0182 (Ada 2012 feature) -* *AI-0182 Additional forms for `Character'Value* (0000-00-00)` +* *AI-0182 Additional forms for* ``Character'Value`` *(0000-00-00)* - This AI allows `Character'Value` to accept the string `'?'` where - `?` is any character including non-graphic control characters. GNAT has + This AI allows ``Character'Value`` to accept the string ``'?'`` where + ``?`` is any character including non-graphic control characters. GNAT has always accepted such strings. It also allows strings such as - `HEX_00000041` to be accepted, but GNAT does not take advantage of this - permission and raises `Constraint_Error`, as is certainly still + ``HEX_00000041`` to be accepted, but GNAT does not take advantage of this + permission and raises ``Constraint_Error``, as is certainly still permitted. RM References: 3.05 (56/2) @@ -298,8 +298,8 @@ Supported Aspect Source * *AI-0173 Testing if tags represent abstract types (2010-07-03)* - The function `Ada.Tags.Type_Is_Abstract` returns `True` if invoked - with the tag of an abstract type, and `False` otherwise. + The function ``Ada.Tags.Type_Is_Abstract`` returns ``True`` if invoked + with the tag of an abstract type, and ``False`` otherwise. RM References: 3.09 (7.4/2) 3.09 (12.4/2) @@ -450,8 +450,8 @@ Supported Aspect Source * *AI-0037 Out-of-range box associations in aggregate (0000-00-00)* - This AI confirms that an association of the form `Indx => <>` in an - array aggregate must raise `Constraint_Error` if `Indx` + This AI confirms that an association of the form ``Indx => <>`` in an + array aggregate must raise ``Constraint_Error`` if ``Indx`` is out of range. The RM specified a range check on other associations, but not when the value of the association was defaulted. GNAT has always inserted a constraint check on the index value. @@ -464,7 +464,7 @@ Supported Aspect Source Equality of untagged record composes, so that the predefined equality for a composite type that includes a component of some untagged record type - `R` uses the equality operation of `R` (which may be user-defined + ``R`` uses the equality operation of ``R`` (which may be user-defined or predefined). This makes the behavior of untagged records identical to that of tagged types in this respect. @@ -541,7 +541,7 @@ Supported Aspect Source The new syntax for iterating over arrays and containers is now implemented. Iteration over containers is for now limited to read-only iterators. Only - default iterators are supported, with the syntax: `for Elem of C`. + default iterators are supported, with the syntax: ``for Elem of C``. RM References: 5.05 @@ -586,7 +586,7 @@ Supported Aspect Source * *AI-0196 Null exclusion tests for out parameters (0000-00-00)* - Null exclusion checks are not made for `**out**` parameters when + Null exclusion checks are not made for ``out`` parameters when evaluating the actual parameters. GNAT has never generated these checks. RM References: 6.04.01 (13) @@ -638,7 +638,7 @@ Supported Aspect Source * *AI-0050 Raising Constraint_Error early for function call (0000-00-00)* - The implementation permissions for raising `Constraint_Error` early on a function call + The implementation permissions for raising ``Constraint_Error`` early on a function call when it was clear an exception would be raised were over-permissive and allowed mishandling of discriminants in some cases. GNAT did not take advantage of these incorrect permissions in any case. @@ -745,7 +745,7 @@ Supported Aspect Source Requeue is permitted to a protected, synchronized or task interface primitive providing it is known that the overriding operation is an entry. Otherwise the requeue statement has the same effect as a procedure call. Use of pragma - `Implemented` provides a way to impose a static requirement on the + ``Implemented`` provides a way to impose a static requirement on the overriding operation by adhering to one of the implementation kinds: entry, protected procedure or any of the above. @@ -756,7 +756,7 @@ Supported Aspect Source * *AI-0201 Independence of atomic object components (2010-07-22)* - If an Atomic object has a pragma `Pack` or a `Component_Size` + If an Atomic object has a pragma ``Pack`` or a ``Component_Size`` attribute, then individual components may not be addressable by independent tasks. However, if the representation clause has no effect (is confirming), then independence is not compromised. Furthermore, in GNAT, specification of @@ -770,8 +770,8 @@ Supported Aspect Source * *AI-0009 Pragma Independent[_Components] (2010-07-23)* - This AI introduces the new pragmas `Independent` and - `Independent_Components`, + This AI introduces the new pragmas ``Independent`` and + ``Independent_Components``, which control guaranteeing independence of access to objects and components. The AI also requires independence not unaffected by confirming rep clauses. @@ -782,7 +782,7 @@ Supported Aspect Source * *AI-0072 Task signalling using 'Terminated (0000-00-00)* - This AI clarifies that task signalling for reading `'Terminated` only + This AI clarifies that task signalling for reading ``'Terminated`` only occurs if the result is True. GNAT semantics has always been consistent with this notion of task signalling. @@ -904,9 +904,9 @@ Supported Aspect Source This AI concerns giving names to various representation aspects, but the practical effect is simply to make the use of duplicate - `Atomic[_Components]`, - `Volatile[_Components]`, and - `Independent[_Components]` pragmas illegal, and GNAT + ``Atomic[_Components]``, + ``Volatile[_Components]``, and + ``Independent[_Components]`` pragmas illegal, and GNAT now performs this required check. RM References: 13.01 (8) @@ -925,7 +925,7 @@ Supported Aspect Source * *AI-0012 Pack/Component_Size for aliased/atomic (2010-07-15)* It is now illegal to give an inappropriate component size or a pragma - `Pack` that attempts to change the component size in the case of atomic + ``Pack`` that attempts to change the component size in the case of atomic or aliased components. Previously GNAT ignored such an attempt with a warning. @@ -945,10 +945,10 @@ Supported Aspect Source * *AI-0095 Address of intrinsic subprograms (0000-00-00)* - The prefix of `'Address` cannot statically denote a subprogram with - convention `Intrinsic`. The use of the `Address` attribute raises - `Program_Error` if the prefix denotes a subprogram with convention - `Intrinsic`. + The prefix of ``'Address`` cannot statically denote a subprogram with + convention ``Intrinsic``. The use of the ``Address`` attribute raises + ``Program_Error`` if the prefix denotes a subprogram with convention + ``Intrinsic``. RM References: 13.03 (11/1) @@ -967,8 +967,8 @@ Supported Aspect Source * *AI-0146 Type invariants (2009-09-21)* Type invariants may be specified for private types using the aspect notation. - Aspect `Type_Invariant` may be specified for any private type, - `Type_Invariant'Class` can + Aspect ``Type_Invariant`` may be specified for any private type, + ``Type_Invariant'Class`` can only be specified for tagged types, and is inherited by any descendent of the tagged types. The invariant is a boolean expression that is tested for being true in the following situations: conversions to the private type, object @@ -976,8 +976,8 @@ Supported Aspect Source [**in**] **out** parameters and returned result on return from any primitive operation for the type that is visible to a client. - GNAT defines the synonyms `Invariant` for `Type_Invariant` and - `Invariant'Class` for `Type_Invariant'Class`. + GNAT defines the synonyms ``Invariant`` for ``Type_Invariant`` and + ``Invariant'Class`` for ``Type_Invariant'Class``. RM References: 13.03.03 (00) @@ -1011,8 +1011,8 @@ Supported Aspect Source * *AI-0193 Alignment of allocators (2010-09-16)* - This AI introduces a new attribute `Max_Alignment_For_Allocation`, - analogous to `Max_Size_In_Storage_Elements`, but for alignment instead + This AI introduces a new attribute ``Max_Alignment_For_Allocation``, + analogous to ``Max_Size_In_Storage_Elements``, but for alignment instead of size. RM References: 13.11 (16) 13.11 (21) 13.11.01 (0) 13.11.01 (1) @@ -1048,7 +1048,7 @@ Supported Aspect Source * *AI-0161 Restriction No_Default_Stream_Attributes (2010-09-11)* - A new restriction `No_Default_Stream_Attributes` prevents the use of any + A new restriction ``No_Default_Stream_Attributes`` prevents the use of any of the default stream attributes for elementary types. If this restriction is in force, then it is necessary to provide explicit subprograms for any stream attributes used. @@ -1059,7 +1059,7 @@ Supported Aspect Source * *AI-0194 Value of Stream_Size attribute (0000-00-00)* - The `Stream_Size` attribute returns the default number of bits in the + The ``Stream_Size`` attribute returns the default number of bits in the stream representation of the given type. This value is not affected by the presence of stream subprogram attributes for the type. GNAT has always implemented @@ -1131,12 +1131,12 @@ Supported Aspect Source * *AI-0114 Classification of letters (0000-00-00)* - The code points 170 (`FEMININE ORDINAL INDICATOR`), - 181 (`MICRO SIGN`), and - 186 (`MASCULINE ORDINAL INDICATOR`) are technically considered + The code points 170 (``FEMININE ORDINAL INDICATOR``), + 181 (``MICRO SIGN``), and + 186 (``MASCULINE ORDINAL INDICATOR``) are technically considered lower case letters by Unicode. However, they are not allowed in identifiers, and they - return `False` to `Ada.Characters.Handling.Is_Letter/Is_Lower`. + return ``False`` to ``Ada.Characters.Handling.Is_Letter/Is_Lower``. This behavior is consistent with that defined in Ada 95. RM References: A.03.02 (59) A.04.06 (7) @@ -1145,11 +1145,11 @@ Supported Aspect Source * *AI-0185 Ada.Wide_[Wide_]Characters.Handling (2010-07-06)* - Two new packages `Ada.Wide_[Wide_]Characters.Handling` provide - classification functions for `Wide_Character` and - `Wide_Wide_Character`, as well as providing - case folding routines for `Wide_[Wide_]Character` and - `Wide_[Wide_]String`. + Two new packages ``Ada.Wide_[Wide_]Characters.Handling`` provide + classification functions for ``Wide_Character`` and + ``Wide_Wide_Character``, as well as providing + case folding routines for ``Wide_[Wide_]Character`` and + ``Wide_[Wide_]String``. RM References: A.03.05 (0) A.03.06 (0) @@ -1157,10 +1157,10 @@ Supported Aspect Source * *AI-0031 Add From parameter to Find_Token (2010-07-25)* - A new version of `Find_Token` is added to all relevant string packages, - with an extra parameter `From`. Instead of starting at the first + A new version of ``Find_Token`` is added to all relevant string packages, + with an extra parameter ``From``. Instead of starting at the first character of the string, the search for a matching Token starts at the - character indexed by the value of `From`. + character indexed by the value of ``From``. These procedures are available in all versions of Ada but if used in versions earlier than Ada 2012 they will generate a warning that an Ada 2012 subprogram is being used. @@ -1173,7 +1173,7 @@ Supported Aspect Source * *AI-0056 Index on null string returns zero (0000-00-00)* The wording in the Ada 2005 RM implied an incompatible handling of the - `Index` functions, resulting in raising an exception instead of + ``Index`` functions, resulting in raising an exception instead of returning zero in some situations. This was not intended and has been corrected. GNAT always returned zero, and is thus consistent with this AI. @@ -1184,20 +1184,20 @@ Supported Aspect Source * *AI-0137 String encoding package (2010-03-25)* - The packages `Ada.Strings.UTF_Encoding`, together with its child - packages, `Conversions`, `Strings`, `Wide_Strings`, - and `Wide_Wide_Strings` have been + The packages ``Ada.Strings.UTF_Encoding``, together with its child + packages, ``Conversions``, ``Strings``, ``Wide_Strings``, + and ``Wide_Wide_Strings`` have been implemented. These packages (whose documentation can be found in the spec files :file:`a-stuten.ads`, :file:`a-suenco.ads`, :file:`a-suenst.ads`, :file:`a-suewst.ads`, :file:`a-suezst.ads`) allow encoding and decoding of - `String`, `Wide_String`, and `Wide_Wide_String` + ``String``, ``Wide_String``, and ``Wide_Wide_String`` values using UTF coding schemes (including UTF-8, UTF-16LE, UTF-16BE, and UTF-16), as well as conversions between the different UTF encodings. With - the exception of `Wide_Wide_Strings`, these packages are available in + the exception of ``Wide_Wide_Strings``, these packages are available in Ada 95 and Ada 2005 mode as well as Ada 2012 mode. - The `Wide_Wide_Strings package` + The ``Wide_Wide_Strings`` package is available in Ada 2005 mode as well as Ada 2012 mode (but not in Ada 95 - mode since it uses `Wide_Wide_Character`). + mode since it uses ``Wide_Wide_Character``). RM References: A.04.11 @@ -1236,7 +1236,7 @@ Supported Aspect Source The compiler is not required to support exporting an Ada subprogram with convention C if there are parameters or a return type of an unconstrained - array type (such as `String`). GNAT allows such declarations but + array type (such as ``String``). GNAT allows such declarations but generates warnings. It is possible, but complicated, to write the corresponding C code and certainly such code would be specific to GNAT and non-portable. @@ -1247,7 +1247,7 @@ Supported Aspect Source * *AI-0216 No_Task_Hierarchy forbids local tasks (0000-00-00)* - It is clearly the intention that `No_Task_Hierarchy` is intended to + It is clearly the intention that ``No_Task_Hierarchy`` is intended to forbid tasks declared locally within subprograms, or functions returning task objects, and that is the implementation that GNAT has always provided. However the language in the RM was not sufficiently clear on this point. @@ -1259,8 +1259,8 @@ Supported Aspect Source * *AI-0211 No_Relative_Delays forbids Set_Handler use (2010-07-09)* - The restriction `No_Relative_Delays` forbids any calls to the subprogram - `Ada.Real_Time.Timing_Events.Set_Handler`. + The restriction ``No_Relative_Delays`` forbids any calls to the subprogram + ``Ada.Real_Time.Timing_Events.Set_Handler``. RM References: D.07 (5) D.07 (10/2) D.07 (10.4/2) D.07 (10.7/2) @@ -1268,7 +1268,7 @@ Supported Aspect Source * *AI-0190 pragma Default_Storage_Pool (2010-09-15)* - This AI introduces a new pragma `Default_Storage_Pool`, which can be + This AI introduces a new pragma ``Default_Storage_Pool``, which can be used to control storage pools globally. In particular, you can force every access type that is used for allocation (**new**) to have an explicit storage pool, @@ -1281,7 +1281,7 @@ Supported Aspect Source * *AI-0189 No_Allocators_After_Elaboration (2010-01-23)* - This AI introduces a new restriction `No_Allocators_After_Elaboration`, + This AI introduces a new restriction ``No_Allocators_After_Elaboration``, which says that no dynamic allocation will occur once elaboration is completed. In general this requires a run-time check, which is not required, and which @@ -1295,9 +1295,9 @@ Supported Aspect Source * *AI-0171 Pragma CPU and Ravenscar Profile (2010-09-24)* - A new package `System.Multiprocessors` is added, together with the - definition of pragma `CPU` for controlling task affinity. A new no - dependence restriction, on `System.Multiprocessors.Dispatching_Domains`, + A new package ``System.Multiprocessors`` is added, together with the + definition of pragma ``CPU`` for controlling task affinity. A new no + dependence restriction, on ``System.Multiprocessors.Dispatching_Domains``, is added to the Ravenscar profile. RM References: D.13.01 (4/2) D.16 @@ -1324,7 +1324,7 @@ Supported Aspect Source * *AI-0152 Restriction No_Anonymous_Allocators (2010-09-08)* - Restriction `No_Anonymous_Allocators` prevents the use of allocators + Restriction ``No_Anonymous_Allocators`` prevents the use of allocators where the type of the returned value is an anonymous access type. RM References: H.04 (8/1) diff --git a/gcc/ada/doc/gnat_rm/implementation_of_specific_ada_features.rst b/gcc/ada/doc/gnat_rm/implementation_of_specific_ada_features.rst index 979752f..3f55dc3 100644 --- a/gcc/ada/doc/gnat_rm/implementation_of_specific_ada_features.rst +++ b/gcc/ada/doc/gnat_rm/implementation_of_specific_ada_features.rst @@ -14,7 +14,7 @@ Machine Code Insertions .. index:: Machine Code insertions -Package `Machine_Code` provides machine code support as described +Package ``Machine_Code`` provides machine code support as described in the Ada Reference Manual in two separate forms: * @@ -30,12 +30,12 @@ and use of the facilities in this package requires understanding the asm instruction, see the section on Extended Asm in :title:`Using_the_GNU_Compiler_Collection_(GCC)`. -Calls to the function `Asm` and the procedure `Asm` have identical +Calls to the function ``Asm`` and the procedure ``Asm`` have identical semantic restrictions and effects as described below. Both are provided so that the procedure call can be used as a statement, and the function call can be used to form a code_statement. -Consider this C `asm` instruction: +Consider this C ``asm`` instruction: :: @@ -51,14 +51,14 @@ The equivalent can be written for GNAT as: My_Float'Asm_Input ("f", angle)); -The first argument to `Asm` is the assembler template, and is +The first argument to ``Asm`` is the assembler template, and is identical to what is used in GNU C. This string must be a static expression. The second argument is the output operand list. It is -either a single `Asm_Output` attribute reference, or a list of such +either a single ``Asm_Output`` attribute reference, or a list of such references enclosed in parentheses (technically an array aggregate of such references). -The `Asm_Output` attribute denotes a function that takes two +The ``Asm_Output`` attribute denotes a function that takes two parameters. The first is a string, the second is the name of a variable of the type designated by the attribute prefix. The first (string) argument is required to be a static expression and designates the @@ -69,19 +69,19 @@ argument is the variable to be written or updated with the result. The possible values for constraint are the same as those used in the RTL, and are dependent on the configuration file used to build the GCC back end. If there are no output operands, then this argument may -either be omitted, or explicitly given as `No_Output_Operands`. +either be omitted, or explicitly given as ``No_Output_Operands``. No support is provided for GNU C's symbolic names for output parameters. The second argument of ``my_float'Asm_Output`` functions as -though it were an `out` parameter, which is a little curious, but +though it were an ``out`` parameter, which is a little curious, but all names have the form of expressions, so there is no syntactic irregularity, even though normally functions would not be permitted -`out` parameters. The third argument is the list of input -operands. It is either a single `Asm_Input` attribute reference, or +``out`` parameters. The third argument is the list of input +operands. It is either a single ``Asm_Input`` attribute reference, or a list of such references enclosed in parentheses (technically an array aggregate of such references). -The `Asm_Input` attribute denotes a function that takes two +The ``Asm_Input`` attribute denotes a function that takes two parameters. The first is a string, the second is an expression of the type designated by the prefix. The first (string) argument is required to be a static expression, and is the constraint for the parameter, @@ -92,19 +92,19 @@ the configuration file used to built the GCC back end. No support is provided for GNU C's symbolic names for input parameters. If there are no input operands, this argument may either be omitted, or -explicitly given as `No_Input_Operands`. The fourth argument, not +explicitly given as ``No_Input_Operands``. The fourth argument, not present in the above example, is a list of register names, called the *clobber* argument. This argument, if given, must be a static string expression, and is a space or comma separated list of names of registers -that must be considered destroyed as a result of the `Asm` call. If +that must be considered destroyed as a result of the ``Asm`` call. If this argument is the null string (the default value), then the code generator assumes that no additional registers are destroyed. -In addition to registers, the special clobbers `memory` and -`cc` as described in the GNU C docs are both supported. +In addition to registers, the special clobbers ``memory`` and +``cc`` as described in the GNU C docs are both supported. The fifth argument, not present in the above example, called the -*volatile* argument, is by default `False`. It can be set to -the literal value `True` to indicate to the code generator that all +*volatile* argument, is by default ``False``. It can be set to +the literal value ``True`` to indicate to the code generator that all optimizations with respect to the instruction specified should be suppressed, and in particular an instruction that has outputs will still be generated, even if none of the outputs are @@ -114,14 +114,14 @@ Generally it is strongly advisable to use Volatile for any ASM statement that is missing either input or output operands or to avoid unwanted optimizations. A warning is generated if this advice is not followed. -No support is provided for GNU C's `asm goto` feature. +No support is provided for GNU C's ``asm goto`` feature. -The `Asm` subprograms may be used in two ways. First the procedure +The ``Asm`` subprograms may be used in two ways. First the procedure forms can be used anywhere a procedure call would be valid, and correspond to what the RM calls 'intrinsic' routines. Such calls can be used to intersperse machine instructions with other Ada statements. Second, the function forms, which return a dummy value of the limited -private type `Asm_Insn`, can be used in code statements, and indeed +private type ``Asm_Insn``, can be used in code statements, and indeed this is the only context where such calls are allowed. Code statements appear as aggregates of the form: @@ -137,7 +137,7 @@ not permissible to intermix such statements with other Ada statements. Typically the form using intrinsic procedure calls is more convenient and more flexible. The code statement form is provided to meet the RM suggestion that such a facility should be made available. The following -is the exact syntax of the call to `Asm`. As usual, if named notation +is the exact syntax of the call to ``Asm``. As usual, if named notation is used, the arguments may be given in arbitrary order, following the normal rules for use of positional and named arguments: @@ -166,10 +166,10 @@ normal rules for use of positional and named arguments: INPUT_OPERAND_ATTRIBUTE ::= SUBTYPE_MARK'Asm_Input (static_string_EXPRESSION, EXPRESSION) -The identifiers `No_Input_Operands` and `No_Output_Operands` -are declared in the package `Machine_Code` and must be referenced +The identifiers ``No_Input_Operands`` and ``No_Output_Operands`` +are declared in the package ``Machine_Code`` and must be referenced according to normal visibility rules. In particular if there is no -`use` clause for this package, then appropriate package name +``use`` clause for this package, then appropriate package name qualification is required. .. _GNAT_Implementation_of_Tasking: @@ -251,7 +251,7 @@ the underlying threads has significant advantages, it does create some complications when it comes to respecting the scheduling semantics specified in the real-time annex (Annex D). -For instance the Annex D requirement for the `FIFO_Within_Priorities` +For instance the Annex D requirement for the ``FIFO_Within_Priorities`` scheduling policy states: *When the active priority of a ready task that is not running @@ -293,22 +293,31 @@ Support for Locking Policies This section specifies which policies specified by pragma Locking_Policy are supported on which platforms. -GNAT supports the standard `Ceiling_Locking` policy, and the -implementation defined `Inheritance_Locking` and -`Concurrent_Readers_Locking` policies. +GNAT supports the standard ``Ceiling_Locking`` policy, and the +implementation defined ``Inheritance_Locking`` and +``Concurrent_Readers_Locking`` policies. -`Ceiling_Locking` is supported on all platforms if the operating system -supports it. In particular, `Ceiling_Locking` is not supported on +``Ceiling_Locking`` is supported on all platforms if the operating system +supports it. In particular, ``Ceiling_Locking`` is not supported on VxWorks. -`Inheritance_Locking` is supported on +``Inheritance_Locking`` is supported on Linux, Darwin (Mac OS X), LynxOS 178, and VxWorks. -`Concurrent_Readers_Locking` is supported on Linux. - -Note that on Linux, `Ceiling_Locking` requires the program to be running -with root privileges. Otherwise, the policy is ignored. +``Concurrent_Readers_Locking`` is supported on Linux. + +Notes about ``Ceiling_Locking`` on Linux: +If the process is running as 'root', ceiling locking is used. +If the capabilities facility is installed +("sudo apt-get --assume-yes install libcap-dev" on Ubuntu, +for example), +and the program is linked against that library +("-largs -lcap"), +and the executable file has the cap_sys_nice capability +("sudo /sbin/setcap cap_sys_nice=ep executable_file_name"), +then ceiling locking is used. +Otherwise, the ``Ceiling_Locking`` policy is ignored. .. _GNAT_Implementation_of_Shared_Passive_Packages: @@ -318,7 +327,7 @@ GNAT Implementation of Shared Passive Packages .. index:: Shared passive packages GNAT fully implements the :index:`pragma <pragma Shared_Passive>` -`Shared_Passive` for +``Shared_Passive`` for the purpose of designating shared passive packages. This allows the use of passive partitions in the context described in the Ada Reference Manual; i.e., for communication @@ -353,7 +362,7 @@ written. .. index:: SHARED_MEMORY_DIRECTORY environment variable -The environment variable `SHARED_MEMORY_DIRECTORY` should be +The environment variable ``SHARED_MEMORY_DIRECTORY`` should be set to the directory to be used for these files. The files in this directory have names that correspond to their fully qualified names. For @@ -367,7 +376,7 @@ example, if we have the package Z : Float; end X; -and the environment variable is set to `/stemp/`, then the files created +and the environment variable is set to ``/stemp/``, then the files created will have the names: :: @@ -384,7 +393,7 @@ will be used. This model ensures that there are no issues in synchronizing the elaboration process, since elaboration of passive packages elaborates the initial values, but does not create the files. -The files are written using normal `Stream_IO` access. +The files are written using normal ``Stream_IO`` access. If you want to be able to communicate between programs or partitions running on different architectures, then you should use the XDR versions of the stream attribute @@ -487,7 +496,7 @@ Constant aggregates with unconstrained nominal types ---------------------------------------------------- In such cases the aggregate itself establishes the subtype, so that -associations with `others` cannot be used. GNAT determines the +associations with ``others`` cannot be used. GNAT determines the bounds for the actual subtype of the aggregate, and allocates the aggregate statically as well. No code is generated for the following: @@ -587,7 +596,7 @@ that temporary will be copied onto the target. The Size of Discriminated Records with Default Discriminants ============================================================ -If a discriminated type `T` has discriminants with default values, it is +If a discriminated type ``T`` has discriminants with default values, it is possible to declare an object of this type without providing an explicit constraint: @@ -620,12 +629,12 @@ that depend on it: In order to support this behavior efficiently, an unconstrained object is given the maximum size that any value of the type requires. In the case -above, `Word` has storage for the discriminant and for -a `String` of length 100. +above, ``Word`` has storage for the discriminant and for +a ``String`` of length 100. It is important to note that unconstrained objects do not require dynamic allocation. It would be an improper implementation to place on the heap those components whose size depends on discriminants. (This improper implementation -was used by some Ada83 compilers, where the `Name` component above +was used by some Ada83 compilers, where the ``Name`` component above would have been stored as a pointer to a dynamic string). Following the principle that dynamic storage management should never be introduced implicitly, @@ -651,13 +660,13 @@ declaration: Too_Large : Rec; is flagged by the compiler with a warning: -an attempt to create `Too_Large` will raise `Storage_Error`, -because the required size includes `Positive'Last` +an attempt to create ``Too_Large`` will raise ``Storage_Error``, +because the required size includes ``Positive'Last`` bytes. As the first example indicates, the proper approach is to declare an index type of 'reasonable' range so that unconstrained objects are not too large. -One final wrinkle: if the object is declared to be `aliased`, or if it is +One final wrinkle: if the object is declared to be ``aliased``, or if it is created in the heap by means of an allocator, then it is *not* unconstrained: it is constrained by the default values of the discriminants, and those values @@ -685,8 +694,8 @@ calls and generic instantiations (*-gnatE*), and stack overflow checking (*-fstack-check*). Note that the result of a floating point arithmetic operation in overflow and -invalid situations, when the `Machine_Overflows` attribute of the result -type is `False`, is to generate IEEE NaN and infinite values. This is the +invalid situations, when the ``Machine_Overflows`` attribute of the result +type is ``False``, is to generate IEEE NaN and infinite values. This is the case for machines compliant with the IEEE floating-point standard, but on machines that are not fully compliant with this standard, such as Alpha, the *-mieee* compiler flag must be used for achieving IEEE confirming diff --git a/gcc/ada/doc/gnat_rm/interfacing_to_other_languages.rst b/gcc/ada/doc/gnat_rm/interfacing_to_other_languages.rst index 63fd5ff..bb629f4 100644 --- a/gcc/ada/doc/gnat_rm/interfacing_to_other_languages.rst +++ b/gcc/ada/doc/gnat_rm/interfacing_to_other_languages.rst @@ -16,13 +16,13 @@ Interfacing to C Interfacing to C with GNAT can use one of two approaches: * - The types in the package `Interfaces.C` may be used. + The types in the package ``Interfaces.C`` may be used. * Standard Ada types may be used directly. This may be less portable to other compilers, but will work on all GNAT compilers, which guarantee correspondence between the C and Ada types. -Pragma `Convention C` may be applied to Ada types, but mostly has no +Pragma ``Convention C`` may be applied to Ada types, but mostly has no effect, since this is the default. The following table shows the correspondence between Ada scalar types and the corresponding C types. @@ -46,11 +46,11 @@ and C types: * Ada enumeration types map to C enumeration types directly if pragma - `Convention C` is specified, which causes them to have int - length. Without pragma `Convention C`, Ada enumeration types map to - 8, 16, or 32 bits (i.e., C types `signed char`, `short`, - `int`, respectively) depending on the number of values passed. - This is the only case in which pragma `Convention C` affects the + ``Convention C`` is specified, which causes them to have int + length. Without pragma ``Convention C``, Ada enumeration types map to + 8, 16, or 32 bits (i.e., C types ``signed char``, ``short``, + ``int``, respectively) depending on the number of values passed. + This is the only case in which pragma ``Convention C`` affects the representation of an Ada type. * @@ -80,29 +80,29 @@ Using these pragmas it is possible to achieve complete inter-operability between Ada tagged types and C++ class definitions. See :ref:`Implementation_Defined_Pragmas`, for more details. -*pragma CPP_Class ([Entity =>] `LOCAL_NAME`)* +:samp:`pragma CPP_Class ([Entity =>] {LOCAL_NAME})` The argument denotes an entity in the current declarative region that is declared as a tagged or untagged record type. It indicates that the type corresponds to an externally declared C++ class type, and is to be laid out the same way that C++ would lay out the type. - Note: Pragma `CPP_Class` is currently obsolete. It is supported + Note: Pragma ``CPP_Class`` is currently obsolete. It is supported for backward compatibility but its functionality is available - using pragma `Import` with `Convention` = `CPP`. + using pragma ``Import`` with ``Convention`` = ``CPP``. -*pragma CPP_Constructor ([Entity =>] `LOCAL_NAME`)* +:samp:`pragma CPP_Constructor ([Entity =>] {LOCAL_NAME})` This pragma identifies an imported function (imported in the usual way - with pragma `Import`) as corresponding to a C++ constructor. + with pragma ``Import``) as corresponding to a C++ constructor. -A few restrictions are placed on the use of the `Access` attribute -in conjunction with subprograms subject to convention `CPP`: the +A few restrictions are placed on the use of the ``Access`` attribute +in conjunction with subprograms subject to convention ``CPP``: the attribute may be used neither on primitive operations of a tagged -record type with convention `CPP`, imported or not, nor on -subprograms imported with pragma `CPP_Constructor`. +record type with convention ``CPP``, imported or not, nor on +subprograms imported with pragma ``CPP_Constructor``. In addition, C++ exceptions are propagated and can be handled in an -`others` choice of an exception handler. The corresponding Ada +``others`` choice of an exception handler. The corresponding Ada occurrence has no message, and the simple name of the exception identity contains ``Foreign_Exception``. Finalization and awaiting dependent tasks works properly when such foreign exceptions are propagated. @@ -118,7 +118,7 @@ It is also possible to import a C++ exception using the following syntax: [External_Name =>] static_string_EXPRESSION); -The `External_Name` is the name of the C++ RTTI symbol. You can then +The ``External_Name`` is the name of the C++ RTTI symbol. You can then cover a specific C++ exception in an exception handler. .. _Interfacing_to_COBOL: @@ -135,7 +135,7 @@ Interfacing to Fortran ====================== Interfacing to Fortran is achieved as described in section B.5 of the -Ada Reference Manual. The pragma `Convention Fortran`, applied to a +Ada Reference Manual. The pragma ``Convention Fortran``, applied to a multi-dimensional array causes the array to be stored in column-major order as required for convenient interface to Fortran. @@ -144,8 +144,8 @@ order as required for convenient interface to Fortran. Interfacing to non-GNAT Ada code ================================ -It is possible to specify the convention `Ada` in a pragma -`Import` or pragma `Export`. However this refers to +It is possible to specify the convention ``Ada`` in a pragma +``Import`` or pragma ``Export``. However this refers to the calling conventions used by GNAT, which may or may not be similar enough to those used by some other Ada 83 / Ada 95 / Ada 2005 compiler to allow interoperation. diff --git a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst index 1558d06..f5f8463 100644 --- a/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst +++ b/gcc/ada/doc/gnat_rm/intrinsic_subprograms.rst @@ -31,13 +31,13 @@ Intrinsic Operators .. index:: Intrinsic operator All the predefined numeric operators in package Standard -in `pragma Import (Intrinsic,..)` +in ``pragma Import (Intrinsic,..)`` declarations. In the binary operator case, the operands must have the same size. The operand or operands must also be appropriate for the operator. For example, for addition, the operands must both be floating-point or both be fixed-point, and the -right operand for `"**"` must have a root type of -`Standard.Integer'Base`. +right operand for ``"**"`` must have a root type of +``Standard.Integer'Base``. You can use an intrinsic operator declaration as in the following example: @@ -52,7 +52,7 @@ You can use an intrinsic operator declaration as in the following example: This declaration would permit 'mixed mode' arithmetic on items -of the differing types `Int1` and `Int2`. +of the differing types ``Int1`` and ``Int2``. It is also possible to specify such operators for private types, if the full views are appropriate arithmetic types. @@ -64,11 +64,11 @@ Compilation_Date .. index:: Compilation_Date This intrinsic subprogram is used in the implementation of the -library package `GNAT.Source_Info`. The only useful use of the +library package ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.Compilation_Date` to obtain the date of -the current compilation (in local time format MMM DD YYYY). +``GNAT.Source_Info.Compilation_ISO_Date`` to obtain the date of +the current compilation (in local time format YYYY-MM-DD). .. _Compilation_Time: @@ -78,10 +78,10 @@ Compilation_Time .. index:: Compilation_Time This intrinsic subprogram is used in the implementation of the -library package `GNAT.Source_Info`. The only useful use of the +library package ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.Compilation_Time` to obtain the time of +``GNAT.Source_Info.Compilation_Time`` to obtain the time of the current compilation (in local time format HH:MM:SS). .. _Enclosing_Entity: @@ -92,10 +92,10 @@ Enclosing_Entity .. index:: Enclosing_Entity This intrinsic subprogram is used in the implementation of the -library package `GNAT.Source_Info`. The only useful use of the +library package ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.Enclosing_Entity` to obtain the name of +``GNAT.Source_Info.Enclosing_Entity`` to obtain the name of the current subprogram, package, task, entry, or protected subprogram. .. _Exception_Information: @@ -106,10 +106,10 @@ Exception_Information .. index:: Exception_Information' This intrinsic subprogram is used in the implementation of the -library package `GNAT.Current_Exception`. The only useful +library package ``GNAT.Current_Exception``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Current_Exception.Exception_Information` to obtain +``GNAT.Current_Exception.Exception_Information`` to obtain the exception information associated with the current exception. .. _Exception_Message: @@ -120,10 +120,10 @@ Exception_Message .. index:: Exception_Message This intrinsic subprogram is used in the implementation of the -library package `GNAT.Current_Exception`. The only useful +library package ``GNAT.Current_Exception``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Current_Exception.Exception_Message` to obtain +``GNAT.Current_Exception.Exception_Message`` to obtain the message associated with the current exception. .. _Exception_Name: @@ -134,10 +134,10 @@ Exception_Name .. index:: Exception_Name This intrinsic subprogram is used in the implementation of the -library package `GNAT.Current_Exception`. The only useful +library package ``GNAT.Current_Exception``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Current_Exception.Exception_Name` to obtain +``GNAT.Current_Exception.Exception_Name`` to obtain the name of the current exception. .. _File: @@ -148,10 +148,10 @@ File .. index:: File This intrinsic subprogram is used in the implementation of the -library package `GNAT.Source_Info`. The only useful use of the +library package ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.File` to obtain the name of the current +``GNAT.Source_Info.File`` to obtain the name of the current file. .. _Line: @@ -162,10 +162,10 @@ Line .. index:: Line This intrinsic subprogram is used in the implementation of the -library package `GNAT.Source_Info`. The only useful use of the +library package ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.Line` to obtain the number of the current +``GNAT.Source_Info.Line`` to obtain the number of the current source line. .. _Shifts_and_Rotates: @@ -184,7 +184,7 @@ Shifts and Rotates .. index:: Rotate_Right In standard Ada, the shift and rotate functions are available only -for the predefined modular types in package `Interfaces`. However, in +for the predefined modular types in package ``Interfaces``. However, in GNAT it is possible to define these functions for any integer type (signed or modular), as in this example: @@ -201,7 +201,7 @@ Shift_Left, Shift_Right, Shift_Right_Arithmetic, Rotate_Left, or Rotate_Right. T must be an integer type. T'Size must be 8, 16, 32 or 64 bits; if T is modular, the modulus must be 2**8, 2**16, 2**32 or 2**64. -The result type must be the same as the type of `Value`. +The result type must be the same as the type of ``Value``. The shift amount must be Natural. The formal parameter names can be anything. @@ -217,9 +217,9 @@ Source_Location .. index:: Source_Location This intrinsic subprogram is used in the implementation of the -library routine `GNAT.Source_Info`. The only useful use of the +library routine ``GNAT.Source_Info``. The only useful use of the intrinsic import in this case is the one in this unit, so an application program should simply call the function -`GNAT.Source_Info.Source_Location` to obtain the current +``GNAT.Source_Info.Source_Location`` to obtain the current source file location. diff --git a/gcc/ada/doc/gnat_rm/obsolescent_features.rst b/gcc/ada/doc/gnat_rm/obsolescent_features.rst index 6c9b61e..2082a2a 100644 --- a/gcc/ada/doc/gnat_rm/obsolescent_features.rst +++ b/gcc/ada/doc/gnat_rm/obsolescent_features.rst @@ -14,7 +14,7 @@ compatibility purposes. pragma No_Run_Time ================== -The pragma `No_Run_Time` is used to achieve an affect similar +The pragma ``No_Run_Time`` is used to achieve an affect similar to the use of the "Zero Foot Print" configurable run time, but without requiring a specially configured run time. The result of using this pragma, which must be used for all units in a partition, is to restrict @@ -27,8 +27,8 @@ includes just those features that are to be made accessible. pragma Ravenscar ================ -The pragma `Ravenscar` has exactly the same effect as pragma -`Profile (Ravenscar)`. The latter usage is preferred since it +The pragma ``Ravenscar`` has exactly the same effect as pragma +``Profile (Ravenscar)``. The latter usage is preferred since it is part of the new Ada 2005 standard. .. _pragma_Restricted_Run_Time: @@ -36,9 +36,9 @@ is part of the new Ada 2005 standard. pragma Restricted_Run_Time ========================== -The pragma `Restricted_Run_Time` has exactly the same effect as -pragma `Profile (Restricted)`. The latter usage is -preferred since the Ada 2005 pragma `Profile` is intended for +The pragma ``Restricted_Run_Time`` has exactly the same effect as +pragma ``Profile (Restricted)``. The latter usage is +preferred since the Ada 2005 pragma ``Profile`` is intended for this kind of implementation dependent addition. .. _pragma_Task_Info: @@ -46,9 +46,9 @@ this kind of implementation dependent addition. pragma Task_Info ================ -The functionality provided by pragma `Task_Info` is now part of the -Ada language. The `CPU` aspect and the package -`System.Multiprocessors` offer a less system-dependent way to specify +The functionality provided by pragma ``Task_Info`` is now part of the +Ada language. The ``CPU`` aspect and the package +``System.Multiprocessors`` offer a less system-dependent way to specify task affinity or to query the number of processsors. Syntax @@ -58,9 +58,9 @@ Syntax pragma Task_Info (EXPRESSION); This pragma appears within a task definition (like pragma -`Priority`) and applies to the task in which it appears. The -argument must be of type `System.Task_Info.Task_Info_Type`. -The `Task_Info` pragma provides system dependent control over +``Priority``) and applies to the task in which it appears. The +argument must be of type ``System.Task_Info.Task_Info_Type``. +The ``Task_Info`` pragma provides system dependent control over aspects of tasking implementation, for example, the ability to map tasks to specific processors. For details on the facilities available for the version of GNAT that you are using, see the documentation @@ -73,9 +73,9 @@ package System.Task_Info (:file:`s-tasinf.ads`) =============================================== This package provides target dependent functionality that is used -to support the `Task_Info` pragma. The predefined Ada package -`System.Multiprocessors` and the `CPU` aspect now provide a -standard replacement for GNAT's `Task_Info` functionality. +to support the ``Task_Info`` pragma. The predefined Ada package +``System.Multiprocessors`` and the ``CPU`` aspect now provide a +standard replacement for GNAT's ``Task_Info`` functionality. .. raw:: latex diff --git a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst index 72987b4..8ff5224 100644 --- a/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/representation_clauses_and_pragmas.rst @@ -1,3 +1,5 @@ +.. role:: switch(samp) + .. _Representation_Clauses_and_Pragmas: ********************************** @@ -35,17 +37,17 @@ values are as follows: * *Elementary Types*. For elementary types, the alignment is the minimum of the actual size of - objects of the type divided by `Storage_Unit`, + objects of the type divided by ``Storage_Unit``, and the maximum alignment supported by the target. (This maximum alignment is given by the GNAT-specific attribute - `Standard'Maximum_Alignment`; see :ref:`Attribute_Maximum_Alignment`.) + ``Standard'Maximum_Alignment``; see :ref:`Attribute_Maximum_Alignment`.) .. index:: Maximum_Alignment attribute - For example, for type `Long_Float`, the object size is 8 bytes, and the + For example, for type ``Long_Float``, the object size is 8 bytes, and the default alignment will be 8 on any target that supports alignments this large, but on some targets, the maximum alignment may be smaller - than 8, in which case objects of type `Long_Float` will be maximally + than 8, in which case objects of type ``Long_Float`` will be maximally aligned. * *Arrays*. @@ -64,9 +66,9 @@ values are as follows: For the normal non-packed case, the alignment of a record is equal to the maximum alignment of any of its components. For tagged records, this - includes the implicit access type used for the tag. If a pragma `Pack` + includes the implicit access type used for the tag. If a pragma ``Pack`` is used and all components are packable (see separate section on pragma - `Pack`), then the resulting alignment is 1, unless the layout of the + ``Pack``), then the resulting alignment is 1, unless the layout of the record makes it profitable to increase it. A special case is when: @@ -86,14 +88,14 @@ values are as follows: end record; for Small'Size use 16; - then the default alignment of the record type `Small` is 2, not 1. This + then the default alignment of the record type ``Small`` is 2, not 1. This leads to more efficient code when the record is treated as a unit, and also - allows the type to specified as `Atomic` on architectures requiring + allows the type to specified as ``Atomic`` on architectures requiring strict alignment. An alignment clause may specify a larger alignment than the default value up to some maximum value dependent on the target (obtainable by using the -attribute reference `Standard'Maximum_Alignment`). It may also specify +attribute reference ``Standard'Maximum_Alignment``). It may also specify a smaller alignment than the default value for enumeration, integer and fixed point types, as well as for record types, for example @@ -107,7 +109,7 @@ fixed point types, as well as for record types, for example .. index:: Alignment, default -The default alignment for the type `V` is 4, as a result of the +The default alignment for the type ``V`` is 4, as a result of the Integer field in the record, but it is permissible, as shown, to override the default alignment of the record with a smaller value. @@ -125,15 +127,15 @@ to control this choice. Consider: subtype RS is R range 1 .. 1000; The alignment clause specifies an alignment of 1 for the first named subtype -`R` but this does not necessarily apply to `RS`. When writing +``R`` but this does not necessarily apply to ``RS``. When writing portable Ada code, you should avoid writing code that explicitly or implicitly relies on the alignment of such subtypes. For the GNAT compiler, if an explicit alignment clause is given, this value is also used for any subsequent subtypes. So for GNAT, in the -above example, you can count on the alignment of `RS` being 1. But this +above example, you can count on the alignment of ``RS`` being 1. But this assumption is non-portable, and other compilers may choose different -alignments for the subtype `RS`. +alignments for the subtype ``RS``. .. _Size_Clauses: @@ -142,13 +144,13 @@ Size Clauses .. index:: Size Clause -The default size for a type `T` is obtainable through the -language-defined attribute `T'Size` and also through the -equivalent GNAT-defined attribute `T'Value_Size`. -For objects of type `T`, GNAT will generally increase the type size +The default size for a type ``T`` is obtainable through the +language-defined attribute ``T'Size`` and also through the +equivalent GNAT-defined attribute ``T'Value_Size``. +For objects of type ``T``, GNAT will generally increase the type size so that the object size (obtainable through the GNAT-defined attribute -`T'Object_Size`) -is a multiple of `T'Alignment * Storage_Unit`. +``T'Object_Size``) +is a multiple of ``T'Alignment * Storage_Unit``. For example: @@ -161,27 +163,27 @@ For example: Y2 : boolean; end record; -In this example, `Smallint'Size` = `Smallint'Value_Size` = 3, +In this example, ``Smallint'Size`` = ``Smallint'Value_Size`` = 3, as specified by the RM rules, but objects of this type will have a size of 8 -(`Smallint'Object_Size` = 8), +(``Smallint'Object_Size`` = 8), since objects by default occupy an integral number of storage units. On some targets, notably older versions of the Digital Alpha, the size of stand alone objects of this type may be 32, reflecting the inability of the hardware to do byte load/stores. -Similarly, the size of type `Rec` is 40 bits -(`Rec'Size` = `Rec'Value_Size` = 40), but +Similarly, the size of type ``Rec`` is 40 bits +(``Rec'Size`` = ``Rec'Value_Size`` = 40), but the alignment is 4, so objects of this type will have their size increased to 64 bits so that it is a multiple of the alignment (in bits). This decision is in accordance with the specific Implementation Advice in RM 13.3(43): - "A `Size` clause should be supported for an object if the specified - `Size` is at least as large as its subtype's `Size`, and corresponds + "A ``Size`` clause should be supported for an object if the specified + ``Size`` is at least as large as its subtype's ``Size``, and corresponds to a size in storage elements that is a multiple of the object's - `Alignment` (if the `Alignment` is nonzero)." + ``Alignment`` (if the ``Alignment`` is nonzero)." An explicit size clause may be used to override the default size by increasing it. For example, if we have: @@ -217,11 +219,11 @@ Storage_Size Clauses .. index:: Storage_Size Clause -For tasks, the `Storage_Size` clause specifies the amount of space +For tasks, the ``Storage_Size`` clause specifies the amount of space to be allocated for the task stack. This cannot be extended, and if the -stack is exhausted, then `Storage_Error` will be raised (if stack -checking is enabled). Use a `Storage_Size` attribute definition clause, -or a `Storage_Size` pragma in the task definition to set the +stack is exhausted, then ``Storage_Error`` will be raised (if stack +checking is enabled). Use a ``Storage_Size`` attribute definition clause, +or a ``Storage_Size`` pragma in the task definition to set the appropriate required size. A useful technique is to include in every task definition a pragma of the form: @@ -229,24 +231,24 @@ task definition a pragma of the form: pragma Storage_Size (Default_Stack_Size); -Then `Default_Stack_Size` can be defined in a global package, and +Then ``Default_Stack_Size`` can be defined in a global package, and modified as required. Any tasks requiring stack sizes different from the default can have an appropriate alternative reference in the pragma. You can also use the *-d* binder switch to modify the default stack size. -For access types, the `Storage_Size` clause specifies the maximum +For access types, the ``Storage_Size`` clause specifies the maximum space available for allocation of objects of the type. If this space is -exceeded then `Storage_Error` will be raised by an allocation attempt. +exceeded then ``Storage_Error`` will be raised by an allocation attempt. In the case where the access type is declared local to a subprogram, the -use of a `Storage_Size` clause triggers automatic use of a special -predefined storage pool (`System.Pool_Size`) that ensures that all +use of a ``Storage_Size`` clause triggers automatic use of a special +predefined storage pool (``System.Pool_Size``) that ensures that all space for the pool is automatically reclaimed on exit from the scope in which the type is declared. A special case recognized by the compiler is the specification of a -`Storage_Size` of zero for an access type. This means that no +``Storage_Size`` of zero for an access type. This means that no items can be allocated from the pool, and this is recognized at compile time, and all the overhead normally associated with maintaining a fixed size storage pool is eliminated. Consider the following example: @@ -336,7 +338,7 @@ variant value to V2, therefore 16 bits must be allocated for V2 in the general case, even fewer bits may be needed at any particular point during the program execution. -As can be seen from the output of this program, the `'Size` +As can be seen from the output of this program, the ``'Size`` attribute applied to such an object in GNAT gives the actual allocated size of the variable, which is the largest size of any of the variants. The Ada Reference Manual is not completely clear on what choice should @@ -387,9 +389,9 @@ The output from this program is 16 16 -Here we see that while the `'Size` attribute always returns +Here we see that while the ``'Size`` attribute always returns the maximum size, regardless of the current variant value, the -`Size` function does indeed return the size of the current +``Size`` function does indeed return the size of the current variant value. @@ -415,7 +417,7 @@ For example, suppose we have the declaration: type Small is range -7 .. -4; for Small'Size use 2; -Although the default size of type `Small` is 4, the `Size` +Although the default size of type ``Small`` is 4, the ``Size`` clause is accepted by GNAT and results in the following representation scheme: @@ -426,7 +428,7 @@ scheme: -5 is represented as 2#10# -4 is represented as 2#11# -Biased representation is only used if the specified `Size` clause +Biased representation is only used if the specified ``Size`` clause cannot be accepted in any other manner. These reduced sizes that force biased representation can be used for all discrete types except for enumeration types for which a representation clause is given. @@ -441,13 +443,13 @@ Value_Size and Object_Size Clauses .. index:: Object_Size .. index:: Size, of objects -In Ada 95 and Ada 2005, `T'Size` for a type `T` is the minimum -number of bits required to hold values of type `T`. +In Ada 95 and Ada 2005, ``T'Size`` for a type ``T`` is the minimum +number of bits required to hold values of type ``T``. Although this interpretation was allowed in Ada 83, it was not required, and this requirement in practice can cause some significant difficulties. -For example, in most Ada 83 compilers, `Natural'Size` was 32. +For example, in most Ada 83 compilers, ``Natural'Size`` was 32. However, in Ada 95 and Ada 2005, -`Natural'Size` is +``Natural'Size`` is typically 31. This means that code may change in behavior when moving from Ada 83 to Ada 95 or Ada 2005. For example, consider: @@ -463,99 +465,99 @@ from Ada 83 to Ada 95 or Ada 2005. For example, consider: at 0 range Natural'Size .. 2 * Natural'Size - 1; end record; -In the above code, since the typical size of `Natural` objects -is 32 bits and `Natural'Size` is 31, the above code can cause +In the above code, since the typical size of ``Natural`` objects +is 32 bits and ``Natural'Size`` is 31, the above code can cause unexpected inefficient packing in Ada 95 and Ada 2005, and in general there are cases where the fact that the object size can exceed the size of the type causes surprises. To help get around this problem GNAT provides two implementation -defined attributes, `Value_Size` and `Object_Size`. When +defined attributes, ``Value_Size`` and ``Object_Size``. When applied to a type, these attributes yield the size of the type (corresponding to the RM defined size attribute), and the size of objects of the type respectively. -The `Object_Size` is used for determining the default size of +The ``Object_Size`` is used for determining the default size of objects and components. This size value can be referred to using the -`Object_Size` attribute. The phrase 'is used' here means that it is +``Object_Size`` attribute. The phrase 'is used' here means that it is the basis of the determination of the size. The backend is free to pad this up if necessary for efficiency, e.g., an 8-bit stand-alone character might be stored in 32 bits on a machine with no efficient byte access instructions such as the Alpha. -The default rules for the value of `Object_Size` for +The default rules for the value of ``Object_Size`` for discrete types are as follows: * - The `Object_Size` for base subtypes reflect the natural hardware + The ``Object_Size`` for base subtypes reflect the natural hardware size in bits (run the compiler with *-gnatS* to find those values for numeric types). Enumeration types and fixed-point base subtypes have 8, 16, 32, or 64 bits for this size, depending on the range of values to be stored. * - The `Object_Size` of a subtype is the same as the - `Object_Size` of + The ``Object_Size`` of a subtype is the same as the + ``Object_Size`` of the type from which it is obtained. * - The `Object_Size` of a derived base type is copied from the parent - base type, and the `Object_Size` of a derived first subtype is copied + The ``Object_Size`` of a derived base type is copied from the parent + base type, and the ``Object_Size`` of a derived first subtype is copied from the parent first subtype. -The `Value_Size` attribute +The ``Value_Size`` attribute is the (minimum) number of bits required to store a value of the type. This value is used to determine how tightly to pack records or arrays with components of this type, and also affects the semantics of unchecked conversion (unchecked conversions where -the `Value_Size` values differ generate a warning, and are potentially +the ``Value_Size`` values differ generate a warning, and are potentially target dependent). -The default rules for the value of `Value_Size` are as follows: +The default rules for the value of ``Value_Size`` are as follows: * - The `Value_Size` for a base subtype is the minimum number of bits + The ``Value_Size`` for a base subtype is the minimum number of bits required to store all values of the type (including the sign bit only if negative values are possible). * If a subtype statically matches the first subtype of a given type, then it has - by default the same `Value_Size` as the first subtype. This is a + by default the same ``Value_Size`` as the first subtype. This is a consequence of RM 13.1(14): "if two subtypes statically match, then their subtype-specific aspects are the same".) * - All other subtypes have a `Value_Size` corresponding to the minimum + All other subtypes have a ``Value_Size`` corresponding to the minimum number of bits required to store all values of the subtype. For dynamic bounds, it is assumed that the value can range down or up to the corresponding bound of the ancestor -The RM defined attribute `Size` corresponds to the -`Value_Size` attribute. +The RM defined attribute ``Size`` corresponds to the +``Value_Size`` attribute. -The `Size` attribute may be defined for a first-named subtype. This sets -the `Value_Size` of +The ``Size`` attribute may be defined for a first-named subtype. This sets +the ``Value_Size`` of the first-named subtype to the given value, and the -`Object_Size` of this first-named subtype to the given value padded up +``Object_Size`` of this first-named subtype to the given value padded up to an appropriate boundary. It is a consequence of the default rules -above that this `Object_Size` will apply to all further subtypes. On the -other hand, `Value_Size` is affected only for the first subtype, any +above that this ``Object_Size`` will apply to all further subtypes. On the +other hand, ``Value_Size`` is affected only for the first subtype, any dynamic subtypes obtained from it directly, and any statically matching -subtypes. The `Value_Size` of any other static subtypes is not affected. +subtypes. The ``Value_Size`` of any other static subtypes is not affected. -`Value_Size` and -`Object_Size` may be explicitly set for any subtype using +``Value_Size`` and +``Object_Size`` may be explicitly set for any subtype using an attribute definition clause. Note that the use of these attributes can cause the RM 13.1(14) rule to be violated. If two access types -reference aliased objects whose subtypes have differing `Object_Size` +reference aliased objects whose subtypes have differing ``Object_Size`` values as a result of explicit attribute definition clauses, then it is illegal to convert from one access subtype to the other. For a more complete description of this additional legality rule, see the -description of the `Object_Size` attribute. +description of the ``Object_Size`` attribute. To get a feel for the difference, consider the following examples (note -that in each case the base is `Short_Short_Integer` with a size of 8): +that in each case the base is ``Short_Short_Integer`` with a size of 8): +---------------------------------------------+-------------+-------------+ |Type or subtype declaration | Object_Size | Value_Size| @@ -582,22 +584,22 @@ case. What GNAT does is to allocate sufficient bits to accomodate any possible dynamic values for the bounds at run-time. So far, so good, but GNAT has to obey the RM rules, so the question is -under what conditions must the RM `Size` be used. +under what conditions must the RM ``Size`` be used. The following is a list -of the occasions on which the RM `Size` must be used: +of the occasions on which the RM ``Size`` must be used: * Component size for packed arrays or records * - Value of the attribute `Size` for a type + Value of the attribute ``Size`` for a type * Warning about sizes not matching for unchecked conversion -For record types, the `Object_Size` is always a multiple of the +For record types, the ``Object_Size`` is always a multiple of the alignment of the type (this is true for all types). In some cases the -`Value_Size` can be smaller. Consider: +``Value_Size`` can be smaller. Consider: .. code-block:: ada @@ -610,18 +612,18 @@ alignment of the type (this is true for all types). In some cases the On a typical 32-bit architecture, the X component will be four bytes, and require four-byte alignment, and the Y component will be one byte. In this -case `R'Value_Size` will be 40 (bits) since this is the minimum size +case ``R'Value_Size`` will be 40 (bits) since this is the minimum size required to store a value of this type, and for example, it is permissible to have a component of type R in an outer array whose component size is -specified to be 48 bits. However, `R'Object_Size` will be 64 (bits), +specified to be 48 bits. However, ``R'Object_Size`` will be 64 (bits), since it must be rounded up so that this value is a multiple of the alignment (4 bytes = 32 bits). -For all other types, the `Object_Size` -and `Value_Size` are the same (and equivalent to the RM attribute `Size`). -Only `Size` may be specified for such types. +For all other types, the ``Object_Size`` +and ``Value_Size`` are the same (and equivalent to the RM attribute ``Size``). +Only ``Size`` may be specified for such types. -Note that `Value_Size` can be used to force biased representation +Note that ``Value_Size`` can be used to force biased representation for a particular subtype. Consider this example: @@ -632,12 +634,12 @@ for a particular subtype. Consider this example: subtype REF is R range E .. F; -By default, `RAB` +By default, ``RAB`` has a size of 1 (sufficient to accommodate the representation -of `A` and `B`, 0 and 1), and `REF` +of ``A`` and ``B``, 0 and 1), and ``REF`` has a size of 3 (sufficient to accommodate the representation -of `E` and `F`, 4 and 5). But if we add the -following `Value_Size` attribute definition clause: +of ``E`` and ``F``, 4 and 5). But if we add the +following ``Value_Size`` attribute definition clause: .. code-block:: ada @@ -645,11 +647,11 @@ following `Value_Size` attribute definition clause: for REF'Value_Size use 1; -then biased representation is forced for `REF`, -and 0 will represent `E` and 1 will represent `F`. -A warning is issued when a `Value_Size` attribute +then biased representation is forced for ``REF``, +and 0 will represent ``E`` and 1 will represent ``F``. +A warning is issued when a ``Value_Size`` attribute definition clause forces biased representation. This -warning can be turned off using `-gnatw.B`. +warning can be turned off using :switch:`-gnatw.B`. .. _Component_Size_Clauses: @@ -713,7 +715,7 @@ Bit_Order Clauses .. index:: ordering, of bits -For record subtypes, GNAT permits the specification of the `Bit_Order` +For record subtypes, GNAT permits the specification of the ``Bit_Order`` attribute. The specification may either correspond to the default bit order for the target, in which case the specification has no effect and places no additional restrictions, or it may be for the non-standard @@ -728,7 +730,7 @@ restrictions placed on component clauses as follows: * Components fitting within a single storage unit. These are unrestricted, and the effect is merely to renumber bits. For - example if we are on a little-endian machine with `Low_Order_First` + example if we are on a little-endian machine with ``Low_Order_First`` being the default, then the following two declarations have exactly the same effect: @@ -759,14 +761,14 @@ restrictions placed on component clauses as follows: The useful application here is to write the second declaration with the - `Bit_Order` attribute definition clause, and know that it will be treated + ``Bit_Order`` attribute definition clause, and know that it will be treated the same, regardless of whether the target is little-endian or big-endian. * Components occupying an integral number of bytes. These are components that exactly fit in two or more bytes. Such component declarations are allowed, but have no effect, since it is important to realize - that the `Bit_Order` specification does not affect the ordering of bytes. + that the ``Bit_Order`` specification does not affect the ordering of bytes. In particular, the following attempt at getting an endian-independent integer does not work: @@ -788,7 +790,7 @@ restrictions placed on component clauses as follows: little-endian machine, and a big-endian integer on a big-endian machine. If byte flipping is required for interoperability between big- and little-endian machines, this must be explicitly programmed. This capability - is not provided by `Bit_Order`. + is not provided by ``Bit_Order``. * Components that are positioned across byte boundaries. @@ -802,7 +804,7 @@ restrictions placed on component clauses as follows: Since the misconception that Bit_Order automatically deals with all endian-related incompatibilities is a common one, the specification of a component field that is an integral number of bytes will always -generate a warning. This warning may be suppressed using `pragma Warnings (Off)` +generate a warning. This warning may be suppressed using ``pragma Warnings (Off)`` if desired. The following section contains additional details regarding the issue of byte ordering. @@ -815,11 +817,11 @@ Effect of Bit_Order on Byte Ordering .. index:: ordering, of bytes -In this section we will review the effect of the `Bit_Order` attribute +In this section we will review the effect of the ``Bit_Order`` attribute definition clause on byte ordering. Briefly, it has no effect at all, but a detailed example will be helpful. Before giving this example, let us review the precise -definition of the effect of defining `Bit_Order`. The effect of a +definition of the effect of defining ``Bit_Order``. The effect of a non-standard bit order is described in section 13.5.3 of the Ada Reference Manual: @@ -836,7 +838,7 @@ this context, we visit section 13.5.1 of the manual: less than Storage_Unit." The critical point here is that storage places are taken from -the values after normalization, not before. So the `Bit_Order` +the values after normalization, not before. So the ``Bit_Order`` interpretation applies to normalized values. The interpretation is described in the later part of the 13.5.3 paragraph: @@ -936,7 +938,7 @@ the byte is backwards, so we have to rewrite the record rep clause as: It is a nuisance to have to rewrite the clause, especially if the code has to be maintained on both machines. However, this is a case that we can handle with the -`Bit_Order` attribute if it is implemented. +``Bit_Order`` attribute if it is implemented. Note that the implementation is not required on byte addressed machines, but it is indeed implemented in GNAT. This means that we can simply use the @@ -953,7 +955,7 @@ independent of whether the code is compiled on a big-endian or little-endian machine. The important point to understand is that byte ordering is not affected. -A `Bit_Order` attribute definition never affects which byte a field +A ``Bit_Order`` attribute definition never affects which byte a field ends up in, only where it ends up in that byte. To make this clear, let us rewrite the record rep clause of the previous example as: @@ -1008,13 +1010,13 @@ This is exactly equivalent to saying (a repeat of the first example): end record; -Why are they equivalent? Well take a specific field, the `Slave_V2` +Why are they equivalent? Well take a specific field, the ``Slave_V2`` field. The storage place attributes are obtained by normalizing the -values given so that the `First_Bit` value is less than 8. After +values given so that the ``First_Bit`` value is less than 8. After normalizing the values (0,10,10) we get (1,2,2) which is exactly what we specified in the other case. -Now one might expect that the `Bit_Order` attribute might affect +Now one might expect that the ``Bit_Order`` attribute might affect bit numbering within the entire record component (two bytes in this case, thus affecting which byte fields end up in), but that is not the way this feature is defined, it only affects numbering of bits, @@ -1022,7 +1024,7 @@ not which byte they end up in. Consequently it never makes sense to specify a starting bit number greater than 7 (for a byte addressable field) if an attribute -definition for `Bit_Order` has been given, and indeed it +definition for ``Bit_Order`` has been given, and indeed it may be actively confusing to specify such a value, so the compiler generates a warning for such usage. @@ -1060,7 +1062,7 @@ some machines we might write: end record; Now to switch between machines, all that is necessary is -to set the boolean constant `Master_Byte_First` in +to set the boolean constant ``Master_Byte_First`` in an appropriate manner. .. _Pragma_Pack_for_Arrays: @@ -1070,7 +1072,7 @@ Pragma Pack for Arrays .. index:: Pragma Pack (for arrays) -Pragma `Pack` applied to an array has an effect that depends upon whether the +Pragma ``Pack`` applied to an array has an effect that depends upon whether the component type is *packable*. For a component type to be *packable*, it must be one of the following cases: @@ -1081,7 +1083,7 @@ be one of the following cases: * Any small simple record type with a static size. For all these cases, if the component subtype size is in the range -1 through 64, then the effect of the pragma `Pack` is exactly as though a +1 through 64, then the effect of the pragma ``Pack`` is exactly as though a component size were specified giving the component subtype size. All other types are non-packable, they occupy an integral number of storage @@ -1096,18 +1098,18 @@ For example if we have: type ar is array (1 .. 8) of r; pragma Pack (ar); -Then the component size of `ar` will be set to 5 (i.e., to `r'size`, -and the size of the array `ar` will be exactly 40 bits). +Then the component size of ``ar`` will be set to 5 (i.e., to ``r'size``, +and the size of the array ``ar`` will be exactly 40 bits). Note that in some cases this rather fierce approach to packing can produce unexpected effects. For example, in Ada 95 and Ada 2005, -subtype `Natural` typically has a size of 31, meaning that if you -pack an array of `Natural`, you get 31-bit +subtype ``Natural`` typically has a size of 31, meaning that if you +pack an array of ``Natural``, you get 31-bit close packing, which saves a few bits, but results in far less efficient access. Since many other Ada compilers will ignore such a packing request, -GNAT will generate a warning on some uses of pragma `Pack` that it guesses +GNAT will generate a warning on some uses of pragma ``Pack`` that it guesses might not be what is intended. You can easily remove this warning by -using an explicit `Component_Size` setting instead, which never generates +using an explicit ``Component_Size`` setting instead, which never generates a warning, since the intention of the programmer is clear in this case. GNAT treats packed arrays in one of two ways. If the size of the array is @@ -1147,7 +1149,7 @@ rejecting the size clause and noting that the minimum size allowed is 64. One special case that is worth noting occurs when the base type of the component size is 8/16/32 and the subtype is one bit less. Notably this -occurs with subtype `Natural`. Consider: +occurs with subtype ``Natural``. Consider: .. code-block:: ada @@ -1155,10 +1157,10 @@ occurs with subtype `Natural`. Consider: pragma Pack (Arr); In all commonly used Ada 83 compilers, this pragma Pack would be ignored, -since typically `Natural'Size` is 32 in Ada 83, and in any case most +since typically ``Natural'Size`` is 32 in Ada 83, and in any case most Ada 83 compilers did not attempt 31 bit packing. -In Ada 95 and Ada 2005, `Natural'Size` is required to be 31. Furthermore, +In Ada 95 and Ada 2005, ``Natural'Size`` is required to be 31. Furthermore, GNAT really does pack 31-bit subtype to 31 bits. This may result in a substantial unintended performance penalty when porting legacy Ada 83 code. To help prevent this, GNAT generates a warning in such cases. If you really @@ -1180,7 +1182,7 @@ Pragma Pack for Records .. index:: Pragma Pack (for records) -Pragma `Pack` applied to a record will pack the components to reduce +Pragma ``Pack`` applied to a record will pack the components to reduce wasted space from alignment gaps and by reducing the amount of space taken by components. We distinguish between *packable* components and *non-packable* components. @@ -1194,13 +1196,13 @@ Components of the following types are considered packable: * Small simple records, where the size is statically known, are also packable. -For all these cases, if the 'Size value is in the range 1 through 64, the +For all these cases, if the ``'Size`` value is in the range 1 through 64, the components occupy the exact number of bits corresponding to this value and are packed with no padding bits, i.e. they can start on an arbitrary bit boundary. All other types are non-packable, they occupy an integral number of storage -units and the only effect of pragma Pack is to remove alignment gaps. +units and the only effect of pragma ``Pack`` is to remove alignment gaps. For example, consider the record @@ -1224,7 +1226,7 @@ For example, consider the record end record; pragma Pack (X2); -The representation for the record X2 is as follows: +The representation for the record ``X2`` is as follows: .. code-block:: ada @@ -1238,17 +1240,17 @@ The representation for the record X2 is as follows: L6 at 18 range 0 .. 71; end record; -Studying this example, we see that the packable fields `L1` -and `L2` are +Studying this example, we see that the packable fields ``L1`` +and ``L2`` are of length equal to their sizes, and placed at specific bit boundaries (and not byte boundaries) to -eliminate padding. But `L3` is of a non-packable float type (because +eliminate padding. But ``L3`` is of a non-packable float type (because it is aliased), so it is on the next appropriate alignment boundary. -The next two fields are fully packable, so `L4` and `L5` are -minimally packed with no gaps. However, type `Rb2` is a packed +The next two fields are fully packable, so ``L4`` and ``L5`` are +minimally packed with no gaps. However, type ``Rb2`` is a packed array that is longer than 64 bits, so it is itself non-packable. Thus -the `L6` field is aligned to the next byte boundary, and takes an +the ``L6`` field is aligned to the next byte boundary, and takes an integral number of bytes, i.e., 72 bits. .. _Record_Representation_Clauses: @@ -1266,7 +1268,7 @@ of the component. .. index:: Component Clause For all components of an elementary type, the only restriction on component -clauses is that the size must be at least the 'Size value of the type +clauses is that the size must be at least the ``'Size`` value of the type (actually the Value_Size). There are no restrictions due to alignment, and such components may freely cross storage boundaries. @@ -1280,7 +1282,7 @@ thus the same lack of restriction applies. For example, if you declare: pragma Pack (R); for R'Size use 49; -then a component clause for a component of type R may start on any +then a component clause for a component of type ``R`` may start on any specified bit boundary, and may specify a value of 49 bits or greater. For packed bit arrays that are longer than 64 bits, there are two @@ -1304,9 +1306,9 @@ the start of the record. No component clause may attempt to overlay this tag. When a tagged type appears as a component, the tag field must have proper alignment -In the case of a record extension T1, of a type T, no component clause applied -to the type T1 can specify a storage location that would overlap the first -T'Size bytes of the record. +In the case of a record extension ``T1``, of a type ``T``, no component clause applied +to the type ``T1`` can specify a storage location that would overlap the first +``T'Size`` bytes of the record. For all other component types, including non-bit-packed arrays, the component can be placed at an arbitrary bit boundary, @@ -1329,13 +1331,6 @@ so for example, the following is permitted: R at 0 range 82 .. 161; end record; -Note: the above rules apply to recent releases of GNAT 5. -In GNAT 3, there are more severe restrictions on larger components. -For composite types, including packed arrays with a size greater than -64 bits, component clauses must respect the alignment requirement of the -type, in particular, always starting on a byte boundary, and the length -must be a multiple of the storage unit. - .. _Handling_of_Records_with_Holes: Handling of Records with Holes @@ -1454,10 +1449,10 @@ manner. Consider the declarations: type t is array (r) of Character; The array type t corresponds to a vector with exactly three elements and -has a default size equal to `3*Character'Size`. This ensures efficient +has a default size equal to ``3*Character'Size``. This ensures efficient use of space, but means that accesses to elements of the array will incur the overhead of converting representation values to the corresponding -positional values, (i.e., the value delivered by the `Pos` attribute). +positional values, (i.e., the value delivered by the ``Pos`` attribute). .. _Address_Clauses: @@ -1557,7 +1552,7 @@ thus when used as an address clause value is always permitted. Additionally, GNAT treats as static an address clause that is an unchecked_conversion of a static integer value. This simplifies the porting of legacy code, and provides a portable equivalent to the GNAT attribute -`To_Address`. +``To_Address``. Another issue with address clauses is the interaction with alignment requirements. When an address clause is given for an object, the address @@ -1570,10 +1565,10 @@ Since this source of erroneous behavior can have unfortunate effects on machines with strict alignment requirements, GNAT checks (at compile time if possible, generating a warning, or at execution time with a run-time check) that the alignment is appropriate. If the -run-time check fails, then `Program_Error` is raised. This run-time +run-time check fails, then ``Program_Error`` is raised. This run-time check is suppressed if range checks are suppressed, or if the special GNAT check Alignment_Check is suppressed, or if -`pragma Restrictions (No_Elaboration_Code)` is in effect. It is also +``pragma Restrictions (No_Elaboration_Code)`` is in effect. It is also suppressed by default on non-strict alignment machines (such as the x86). Finally, GNAT does not permit overlaying of objects of class-wide types. In @@ -1661,13 +1656,13 @@ or alternatively, using the form recommended by the RM: for B'Address use Addr; -In both of these cases, `A` and `B` become aliased to one another +In both of these cases, ``A`` and ``B`` become aliased to one another via the address clause. This use of address clauses to overlay variables, achieving an effect similar to unchecked conversion was erroneous in Ada 83, but in Ada 95 and Ada 2005 the effect is implementation defined. Furthermore, the Ada RM specifically recommends that in a situation -like this, `B` should be subject to the following +like this, ``B`` should be subject to the following implementation advice (RM 13.3(19)): "19 If the Address of an object is specified, or it is imported @@ -1675,13 +1670,13 @@ implementation advice (RM 13.3(19)): optimizations based on assumptions of no aliases." GNAT follows this recommendation, and goes further by also applying -this recommendation to the overlaid variable (`A` in the above example) +this recommendation to the overlaid variable (``A`` in the above example) in this case. This means that the overlay works "as expected", in that a modification to one of the variables will affect the value of the other. More generally, GNAT interprets this recommendation conservatively for address clauses: in the cases other than overlays, it considers that the -object is effectively subject to pragma `Volatile` and implements the +object is effectively subject to pragma ``Volatile`` and implements the associated semantics. Note that when address clause overlays are used in this way, there is an @@ -1704,9 +1699,9 @@ issue of unintentional initialization, as shown by this example: end Overwrite_Record; -Here the default initialization of `Y` will clobber the value -of `X`, which justifies the warning. The warning notes that -this effect can be eliminated by adding a `pragma Import` +Here the default initialization of ``Y`` will clobber the value +of ``X``, which justifies the warning. The warning notes that +this effect can be eliminated by adding a ``pragma Import`` which suppresses the initialization: .. code-block:: ada @@ -1723,12 +1718,12 @@ which suppresses the initialization: end Overwrite_Record; -Note that the use of `pragma Initialize_Scalars` may cause variables to +Note that the use of ``pragma Initialize_Scalars`` may cause variables to be initialized when they would not otherwise have been in the absence of the use of this pragma. This may cause an overlay to have this unintended clobbering effect. The compiler avoids this for scalar types, but not for composite objects (where in general the effect -of `Initialize_Scalars` is part of the initialization routine +of ``Initialize_Scalars`` is part of the initialization routine for the composite object: :: @@ -1754,7 +1749,7 @@ for the composite object: end Overwrite_Array; The above program generates the warning as shown, and at execution -time, prints `X was clobbered`. If the `pragma Import` is +time, prints ``X was clobbered``. If the ``pragma Import`` is added as suggested: .. code-block:: ada @@ -1776,7 +1771,7 @@ added as suggested: end Overwrite_Array; then the program compiles without the warning and when run will generate -the output `X was not clobbered`. +the output ``X was not clobbered``. .. _Use_of_Address_Clauses_for_Memory-Mapped_I/O: @@ -1834,8 +1829,8 @@ It is best to be explicit in this situation, by either declaring the components to be atomic if you want the byte store, or explicitly writing the full word access sequence if that is what the hardware requires. Alternatively, if the full word access sequence is required, GNAT also -provides the pragma `Volatile_Full_Access` which can be used in lieu of -pragma `Atomic` and will give the additional guarantee. +provides the pragma ``Volatile_Full_Access`` which can be used in lieu of +pragma ``Atomic`` and will give the additional guarantee. .. _Effect_of_Convention_on_Representation: @@ -1872,9 +1867,9 @@ There are four exceptions to this general rule: type Color is (Red, Green, Blue); 8 bits is sufficient to store all values of the type, so by default, objects - of type `Color` will be represented using 8 bits. However, normal C + of type ``Color`` will be represented using 8 bits. However, normal C convention is to use 32 bits for all enum values in C, since enum values - are essentially of type int. If pragma `Convention C` is specified for an + are essentially of type int. If pragma ``Convention C`` is specified for an Ada enumeration type, then the size is modified as necessary (usually to 32 bits) to be consistent with the C convention for enum values. @@ -1893,7 +1888,7 @@ There are four exceptions to this general rule: true. In Ada, the normal convention is that two specific values, typically 0/1, are used to represent false/true respectively. - Fortran has a similar convention for `LOGICAL` values (any nonzero + Fortran has a similar convention for ``LOGICAL`` values (any nonzero value represents true). To accommodate the Fortran and C conventions, if a pragma Convention specifies @@ -2006,8 +2001,8 @@ representation clause or pragma is accepted, there can still be questions of what the compiler actually does. For example, if a partial record representation clause specifies the location of some components and not others, then where are the non-specified components placed? Or if pragma -`Pack` is used on a record, then exactly where are the resulting -fields placed? The section on pragma `Pack` in this chapter can be +``Pack`` is used on a record, then exactly where are the resulting +fields placed? The section on pragma ``Pack`` in this chapter can be used to answer the second question, but it is often easier to just see what the compiler does. @@ -2130,7 +2125,7 @@ fields present, including the parent field, which is a copy of the fields of the parent type of r2, i.e., r1. The component size and size clauses for types rb1 and rb2 show -the exact effect of pragma `Pack` on these arrays, and the record +the exact effect of pragma ``Pack`` on these arrays, and the record representation clause for type x2 shows how pragma `Pack` affects this record type. diff --git a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst index 78c489b..7b64768 100644 --- a/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst +++ b/gcc/ada/doc/gnat_rm/standard_and_implementation_defined_restrictions.rst @@ -54,8 +54,8 @@ the call. .. index:: Max_Entry_Queue_Depth -The restriction `Max_Entry_Queue_Depth` is recognized as a -synonym for `Max_Entry_Queue_Length`. This is retained for historical +The restriction ``Max_Entry_Queue_Depth`` is recognized as a +synonym for ``Max_Entry_Queue_Length``. This is retained for historical compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @@ -201,7 +201,7 @@ No_Dispatch .. index:: No_Dispatch [RM H.4] This restriction ensures at compile time that there are no -occurrences of `T'Class`, for any (tagged) subtype `T`. +occurrences of ``T'Class``, for any (tagged) subtype ``T``. No_Dispatching_Calls -------------------- @@ -217,7 +217,7 @@ in the implementation of class-wide objects assignments. The membership test is allowed in the presence of this restriction, because its implementation requires no dispatching. This restriction is comparable to the official Ada restriction -`No_Dispatch` except that it is a bit less restrictive in that it allows +``No_Dispatch`` except that it is a bit less restrictive in that it allows all classwide constructs that do not imply dispatching. The following example indicates constructs that violate this restriction. @@ -274,8 +274,8 @@ Detach_Handler, and Reference). .. index:: No_Dynamic_Interrupts -The restriction `No_Dynamic_Interrupts` is recognized as a -synonym for `No_Dynamic_Attachment`. This is retained for historical +The restriction ``No_Dynamic_Interrupts`` is recognized as a +synonym for ``No_Dynamic_Attachment``. This is retained for historical compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @@ -368,11 +368,11 @@ performed by the compiler to support these features. The following types are no longer considered controlled when this restriction is in effect: * - `Ada.Finalization.Controlled` + ``Ada.Finalization.Controlled`` * - `Ada.Finalization.Limited_Controlled` + ``Ada.Finalization.Limited_Controlled`` * - Derivations from `Controlled` or `Limited_Controlled` + Derivations from ``Controlled`` or ``Limited_Controlled`` * Class-wide types * @@ -421,8 +421,8 @@ No_Implicit_Dynamic_Code [GNAT] This restriction prevents the compiler from building 'trampolines'. This is a structure that is built on the stack and contains dynamic code to be executed at run time. On some targets, a trampoline is -built for the following features: `Access`, -`Unrestricted_Access`, or `Address` of a nested subprogram; +built for the following features: ``Access``, +``Unrestricted_Access``, or ``Address`` of a nested subprogram; nested task bodies; primitive operations of nested tagged types. Trampolines do not work on machines that prevent execution of stack data. For example, on windows systems, enabling DEP (data execution @@ -433,8 +433,8 @@ On many targets, trampolines have been largely eliminated. Look at the version of system.ads for your target --- if it has Always_Compatible_Rep equal to False, then trampolines are largely eliminated. In particular, a trampoline is built for the following -features: `Address` of a nested subprogram; -`Access` or `Unrestricted_Access` of a nested subprogram, +features: ``Address`` of a nested subprogram; +``Access`` or ``Unrestricted_Access`` of a nested subprogram, but only if pragma Favor_Top_Level applies, or the access type has a foreign-language convention; primitive operations of nested tagged types. @@ -559,7 +559,7 @@ No_Relative_Delay .. index:: No_Relative_Delay [RM D.7] This restriction ensures at compile time that there are no delay -relative statements and prevents expressions such as `delay 1.23;` from +relative statements and prevents expressions such as ``delay 1.23;`` from appearing in source code. No_Requeue_Statements @@ -567,13 +567,13 @@ No_Requeue_Statements .. index:: No_Requeue_Statements [RM D.7] This restriction ensures at compile time that no requeue statements -are permitted and prevents keyword `requeue` from being used in source +are permitted and prevents keyword ``requeue`` from being used in source code. .. index:: No_Requeue -The restriction `No_Requeue` is recognized as a -synonym for `No_Requeue_Statements`. This is retained for historical +The restriction ``No_Requeue`` is recognized as a +synonym for ``No_Requeue_Statements``. This is retained for historical compatibility purposes (and a warning will be generated for its use if warnings on oNobsolescent features are activated). @@ -584,7 +584,7 @@ No_Secondary_Stack [GNAT] This restriction ensures at compile time that the generated code does not contain any reference to the secondary stack. The secondary stack is used to implement functions returning unconstrained objects -(arrays or records) on some targets. Suppresses the allocation of +(arrays or records) on some targets. Suppresses the allocation of secondary stacks for tasks (excluding the environment task) at run time. No_Select_Statements @@ -592,7 +592,7 @@ No_Select_Statements .. index:: No_Select_Statements [RM D.7] This restriction ensures at compile time no select statements of any -kind are permitted, that is the keyword `select` may not appear. +kind are permitted, that is the keyword ``select`` may not appear. No_Specific_Termination_Handlers -------------------------------- @@ -632,8 +632,8 @@ No_Stream_Optimizations .. index:: No_Stream_Optimizations [GNAT] This restriction affects the performance of stream operations on types -`String`, `Wide_String` and `Wide_Wide_String`. By default, the -compiler uses block reads and writes when manipulating `String` objects +``String``, ``Wide_String`` and ``Wide_Wide_String``. By default, the +compiler uses block reads and writes when manipulating ``String`` objects due to their supperior performance. When this restriction is in effect, the compiler performs all IO operations on a per-character basis. @@ -644,8 +644,8 @@ No_Streams [GNAT] This restriction ensures at compile/bind time that there are no stream objects created and no use of stream attributes. This restriction does not forbid dependences on the package -`Ada.Streams`. So it is permissible to with -`Ada.Streams` (or another package that does so itself) +``Ada.Streams``. So it is permissible to with +``Ada.Streams`` (or another package that does so itself) as long as no actual stream objects are created and no stream attributes are used. @@ -676,12 +676,12 @@ No_Task_Attributes_Package .. index:: No_Task_Attributes_Package [GNAT] This restriction ensures at compile time that there are no implicit or -explicit dependencies on the package `Ada.Task_Attributes`. +explicit dependencies on the package ``Ada.Task_Attributes``. .. index:: No_Task_Attributes -The restriction `No_Task_Attributes` is recognized as a synonym -for `No_Task_Attributes_Package`. This is retained for historical +The restriction ``No_Task_Attributes`` is recognized as a synonym +for ``No_Task_Attributes_Package``. This is retained for historical compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @@ -704,7 +704,7 @@ No_Tasking [GNAT] This restriction prevents the declaration of tasks or task types throughout the partition. It is similar in effect to the use of -`Max_Tasks => 0` except that violations are caught at compile time +``Max_Tasks => 0`` except that violations are caught at compile time and cause an error message to be output either by the compiler or binder. @@ -755,8 +755,7 @@ Pure_Barriers [GNAT] This restriction ensures at compile time that protected entry barriers are restricted to: -* simple variables defined in the private part of the - protected type/object, +* components of the protected object (excluding selection from dereferences), * constant declarations, * named numbers, * enumeration literals, @@ -765,7 +764,8 @@ barriers are restricted to: * character literals, * implicitly defined comparison operators, * uses of the Standard."not" operator, -* short-circuit operator +* short-circuit operator, +* the Count attribute This restriction is a relaxation of the Simple_Barriers restriction, but still ensures absence of side effects, exceptions, and recursion @@ -782,8 +782,8 @@ part of the protected type. No other form of entry barriers is permitted. .. index:: Boolean_Entry_Barriers -The restriction `Boolean_Entry_Barriers` is recognized as a -synonym for `Simple_Barriers`. This is retained for historical +The restriction ``Boolean_Entry_Barriers`` is recognized as a +synonym for ``Simple_Barriers``. This is retained for historical compatibility purposes (and a warning will be generated for its use if warnings on obsolescent features are activated). @@ -793,7 +793,7 @@ Static_Priorities [GNAT] This restriction ensures at compile time that all priority expressions are static, and that there are no dependences on the package -`Ada.Dynamic_Priorities`. +``Ada.Dynamic_Priorities``. Static_Storage_Size ------------------- @@ -820,10 +820,10 @@ No_Elaboration_Code [GNAT] This restriction ensures at compile time that no elaboration code is generated. Note that this is not the same condition as is enforced -by pragma `Preelaborate`. There are cases in which pragma -`Preelaborate` still permits code to be generated (e.g., code +by pragma ``Preelaborate``. There are cases in which pragma +``Preelaborate`` still permits code to be generated (e.g., code to initialize a large array to all zeroes), and there are cases of units -which do not meet the requirements for pragma `Preelaborate`, +which do not meet the requirements for pragma ``Preelaborate``, but for which no elaboration code is generated. Generally, it is the case that preelaborable units will meet the restrictions, with the exception of large aggregates initialized with an others_clause, @@ -834,7 +834,7 @@ throughout a partition. In the case of aggregates with others, if the aggregate has a dynamic size, there is no way to eliminate the elaboration code (such dynamic -bounds would be incompatible with `Preelaborate` in any case). If +bounds would be incompatible with ``Preelaborate`` in any case). If the bounds are static, then use of this restriction actually modifies the code choice of the compiler to avoid generating a loop, and instead generate the aggregate statically if possible, no matter how many times @@ -932,7 +932,7 @@ No_Implementation_Restrictions .. index:: No_Implementation_Restrictions [GNAT] This restriction checks at compile time that no GNAT-defined restriction -identifiers (other than `No_Implementation_Restrictions` itself) +identifiers (other than ``No_Implementation_Restrictions`` itself) are present. With this restriction, the only other restriction identifiers that can be used are those defined in the Ada Reference Manual. @@ -961,9 +961,9 @@ No_Implicit_Loops .. index:: No_Implicit_Loops [GNAT] This restriction ensures that the generated code of the unit marked -with this restriction does not contain any implicit `for` loops, either by +with this restriction does not contain any implicit ``for`` loops, either by modifying the generated code where possible, or by rejecting any construct -that would otherwise generate an implicit `for` loop. If this restriction is +that would otherwise generate an implicit ``for`` loop. If this restriction is active, it is possible to build large array aggregates with all static components without generating an intermediate temporary, and without generating a loop to initialize individual components. Otherwise, a loop is created for @@ -982,11 +982,11 @@ No_Wide_Characters .. index:: No_Wide_Characters [GNAT] This restriction ensures at compile time that no uses of the types -`Wide_Character` or `Wide_String` or corresponding wide +``Wide_Character`` or ``Wide_String`` or corresponding wide wide types appear, and that no wide or wide wide string or character literals appear in the program (that is literals representing characters not in -type `Character`). +type ``Character``). SPARK_05 -------- @@ -1005,10 +1005,10 @@ SPARK restriction have the form: .. index:: SPARK -The restriction `SPARK` is recognized as a -synonym for `SPARK_05`. This is retained for historical +The restriction ``SPARK`` is recognized as a +synonym for ``SPARK_05``. This is retained for historical compatibility purposes (and an unconditional warning will be generated -for its use, advising replacement by `SPARK`). +for its use, advising replacement by ``SPARK``). This is not a replacement for the semantic checks performed by the SPARK Examiner tool, as the compiler currently only deals with code, @@ -1018,7 +1018,7 @@ cases of constructs forbidden by SPARK 2005. Thus it may well be the case that code which passes the compiler with the SPARK restriction is rejected by the SPARK Examiner, e.g. due to the different visibility rules of the Examiner based on SPARK 2005 -`inherit` annotations. +``inherit`` annotations. This restriction can be useful in providing an initial filter for code developed using SPARK 2005, or in examining legacy code to see how far diff --git a/gcc/ada/doc/gnat_rm/standard_library_routines.rst b/gcc/ada/doc/gnat_rm/standard_library_routines.rst index 6c9ac9f..e6fceeb 100644 --- a/gcc/ada/doc/gnat_rm/standard_library_routines.rst +++ b/gcc/ada/doc/gnat_rm/standard_library_routines.rst @@ -37,31 +37,31 @@ the unit is not implemented. ``Ada.Assertions`` *(11.4.2)* - `Assertions` provides the `Assert` subprograms, and also - the declaration of the `Assertion_Error` exception. + ``Assertions`` provides the ``Assert`` subprograms, and also + the declaration of the ``Assertion_Error`` exception. ``Ada.Asynchronous_Task_Control`` *(D.11)* - `Asynchronous_Task_Control` provides low level facilities for task + ``Asynchronous_Task_Control`` provides low level facilities for task synchronization. It is typically not implemented. See package spec for details. ``Ada.Calendar`` *(9.6)* - `Calendar` provides time of day access, and routines for + ``Calendar`` provides time of day access, and routines for manipulating times and durations. ``Ada.Calendar.Arithmetic`` *(9.6.1)* This package provides additional arithmetic - operations for `Calendar`. + operations for ``Calendar``. ``Ada.Calendar.Formatting`` *(9.6.1)* - This package provides formatting operations for `Calendar`. + This package provides formatting operations for ``Calendar``. ``Ada.Calendar.Time_Zones`` *(9.6.1)* - This package provides additional `Calendar` facilities + This package provides additional ``Calendar`` facilities for handling time zones. @@ -84,14 +84,14 @@ the unit is not implemented. that appear in type CHARACTER. It is useful for writing programs that will run in international environments. For example, if you want an upper case E with an acute accent in a string, it is often better to use - the definition of `UC_E_Acute` in this package. Then your program + the definition of ``UC_E_Acute`` in this package. Then your program will print in an understandable manner even if your environment does not support these extended characters. ``Ada.Command_Line`` *(A.15)* This package provides access to the command line parameters and the name - of the current program (analogous to the use of `argc` and `argv` + of the current program (analogous to the use of ``argc`` and ``argv`` in C), and also allows the exit status for the program to be set in a system-independent manner. @@ -272,7 +272,9 @@ the unit is not implemented. ``Ada.Locales`` *(A.19)* This package provides declarations providing information (Language - and Country) about the current locale. + and Country) about the current locale. This package is currently not + implemented other than by providing stubs which will always return + Language_Unknown/Country_Unknown. ``Ada.Numerics`` @@ -289,14 +291,14 @@ the unit is not implemented. ``Ada.Numerics.Complex_Elementary_Functions`` Provides the implementation of standard elementary functions (such as log and trigonometric functions) operating on complex numbers using the - standard `Float` and the `Complex` and `Imaginary` types - created by the package `Numerics.Complex_Types`. + standard ``Float`` and the ``Complex`` and ``Imaginary`` types + created by the package ``Numerics.Complex_Types``. ``Ada.Numerics.Complex_Types`` This is a predefined instantiation of - `Numerics.Generic_Complex_Types` using `Standard.Float` to - build the type `Complex` and `Imaginary`. + ``Numerics.Generic_Complex_Types`` using ``Standard.Float`` to + build the type ``Complex`` and ``Imaginary``. ``Ada.Numerics.Discrete_Random`` @@ -318,15 +320,15 @@ the unit is not implemented. * ``Short_Float`` - `Ada.Numerics.Short_Complex_Elementary_Functions` + ``Ada.Numerics.Short_Complex_Elementary_Functions`` * ``Float`` - `Ada.Numerics.Complex_Elementary_Functions` + ``Ada.Numerics.Complex_Elementary_Functions`` * ``Long_Float`` - `Ada.Numerics.Long_Complex_Elementary_Functions` + ``Ada.Numerics.Long_Complex_Elementary_Functions`` ``Ada.Numerics.Generic_Complex_Types`` This is a generic package that allows the creation of complex types, @@ -336,15 +338,15 @@ the unit is not implemented. * ``Short_Float`` - `Ada.Numerics.Short_Complex_Complex_Types` + ``Ada.Numerics.Short_Complex_Complex_Types`` * ``Float`` - `Ada.Numerics.Complex_Complex_Types` + ``Ada.Numerics.Complex_Complex_Types`` * ``Long_Float`` - `Ada.Numerics.Long_Complex_Complex_Types` + ``Ada.Numerics.Long_Complex_Complex_Types`` ``Ada.Numerics.Generic_Elementary_Functions`` This is a generic package that provides the implementation of standard @@ -355,15 +357,15 @@ the unit is not implemented. * ``Short_Float`` - `Ada.Numerics.Short_Elementary_Functions` + ``Ada.Numerics.Short_Elementary_Functions`` * ``Float`` - `Ada.Numerics.Elementary_Functions` + ``Ada.Numerics.Elementary_Functions`` * ``Long_Float`` - `Ada.Numerics.Long_Elementary_Functions` + ``Ada.Numerics.Long_Elementary_Functions`` ``Ada.Numerics.Generic_Real_Arrays`` *(G.3.1)* Generic operations on arrays of reals @@ -372,7 +374,7 @@ the unit is not implemented. Preinstantiation of Ada.Numerics.Generic_Real_Arrays (Float). ``Ada.Real_Time`` *(D.8)* - This package provides facilities similar to those of `Calendar`, but + This package provides facilities similar to those of ``Calendar``, but operating with a finer clock suitable for real time control. Note that annex D requires that there be no backward clock jumps, and GNAT generally guarantees this behavior, but of course if the external clock on which @@ -394,12 +396,12 @@ the unit is not implemented. ``Ada.Streams`` *(13.13.1)* This is a generic package that provides the basic support for the - concept of streams as used by the stream attributes (`Input`, - `Output`, `Read` and `Write`). + concept of streams as used by the stream attributes (``Input``, + ``Output``, ``Read`` and ``Write``). ``Ada.Streams.Stream_IO`` *(A.12.1)* - This package is a specialization of the type `Streams` defined in - package `Streams` together with a set of operations providing + This package is a specialization of the type ``Streams`` defined in + package ``Streams`` together with a set of operations providing Stream_IO capability. The Stream_IO model permits both random and sequential access to a file which can contain an arbitrary set of values of one or more Ada types. @@ -511,8 +513,8 @@ the unit is not implemented. ``Ada.Strings.Wide_Unbounded`` *(A.4.7)* These packages provide analogous capabilities to the corresponding packages without ``Wide_`` in the name, but operate with the types - `Wide_String` and `Wide_Character` instead of `String` - and `Character`. Versions of all the child packages are available. + ``Wide_String`` and ``Wide_Character`` instead of ``String`` + and ``Character``. Versions of all the child packages are available. ``Ada.Strings.Wide_Wide_Bounded`` *(A.4.7)* @@ -523,8 +525,8 @@ the unit is not implemented. ``Ada.Strings.Wide_Wide_Unbounded`` *(A.4.7)* These packages provide analogous capabilities to the corresponding packages without ``Wide_`` in the name, but operate with the types - `Wide_Wide_String` and `Wide_Wide_Character` instead - of `String` and `Character`. + ``Wide_Wide_String`` and ``Wide_Wide_Character`` instead + of ``String`` and ``Character``. ``Ada.Synchronous_Barriers`` *(D.10.1)* This package provides facilities for synchronizing tasks at a low level @@ -578,15 +580,15 @@ the unit is not implemented. * ``Short_Float`` - `Short_Float_Text_IO` + ``Short_Float_Text_IO`` * ``Float`` - `Float_Text_IO` + ``Float_Text_IO`` * ``Long_Float`` - `Long_Float_Text_IO` + ``Long_Float_Text_IO`` ``Ada.Text_IO.Integer_IO`` Provides input-output facilities for integer types. The following @@ -594,23 +596,23 @@ the unit is not implemented. * ``Short_Short_Integer`` - `Ada.Short_Short_Integer_Text_IO` + ``Ada.Short_Short_Integer_Text_IO`` * ``Short_Integer`` - `Ada.Short_Integer_Text_IO` + ``Ada.Short_Integer_Text_IO`` * ``Integer`` - `Ada.Integer_Text_IO` + ``Ada.Integer_Text_IO`` * ``Long_Integer`` - `Ada.Long_Integer_Text_IO` + ``Ada.Long_Integer_Text_IO`` * ``Long_Long_Integer`` - `Ada.Long_Long_Integer_Text_IO` + ``Ada.Long_Long_Integer_Text_IO`` ``Ada.Text_IO.Modular_IO`` Provides input-output facilities for modular (unsigned) types. @@ -691,17 +693,17 @@ the unit is not implemented. allocated by use of an allocator. ``Ada.Wide_Text_IO`` *(A.11)* - This package is similar to `Ada.Text_IO`, except that the external + This package is similar to ``Ada.Text_IO``, except that the external file supports wide character representations, and the internal types are - `Wide_Character` and `Wide_String` instead of `Character` - and `String`. The corresponding set of nested packages and child + ``Wide_Character`` and ``Wide_String`` instead of ``Character`` + and ``String``. The corresponding set of nested packages and child packages are defined. ``Ada.Wide_Wide_Text_IO`` *(A.11)* - This package is similar to `Ada.Text_IO`, except that the external + This package is similar to ``Ada.Text_IO``, except that the external file supports wide character representations, and the internal types are - `Wide_Character` and `Wide_String` instead of `Character` - and `String`. The corresponding set of nested packages and child + ``Wide_Character`` and ``Wide_String`` instead of ``Character`` + and ``String``. The corresponding set of nested packages and child packages are defined. For packages in Interfaces and System, all the RM defined packages are diff --git a/gcc/ada/doc/gnat_rm/the_gnat_library.rst b/gcc/ada/doc/gnat_rm/the_gnat_library.rst index 57607fe..ed614e3 100644 --- a/gcc/ada/doc/gnat_rm/the_gnat_library.rst +++ b/gcc/ada/doc/gnat_rm/the_gnat_library.rst @@ -1,3 +1,5 @@ +.. role:: switch(samp) + .. _The_GNAT_Library: **************** @@ -18,116 +20,116 @@ with all GNAT releases. For example, to find out the full specifications of the SPITBOL pattern matching capability, including a full tutorial and extensive examples, look in the :file:`g-spipat.ads` file in the library. -For each entry here, the package name (as it would appear in a `with` +For each entry here, the package name (as it would appear in a ``with`` clause) is given, followed by the name of the corresponding spec file in -parentheses. The packages are children in four hierarchies, `Ada`, -`Interfaces`, `System`, and `GNAT`, the latter being a +parentheses. The packages are children in four hierarchies, ``Ada``, +``Interfaces``, ``System``, and ``GNAT``, the latter being a GNAT-specific hierarchy. Note that an application program should only use packages in one of these four hierarchies if the package is defined in the Ada Reference Manual, or is listed in this section of the GNAT Programmers Reference Manual. All other units should be considered internal implementation units and -should not be directly `with`'ed by application code. The use of -a `with` statement that references one of these internal implementation +should not be directly ``with``\ ed by application code. The use of +a ``with`` clause that references one of these internal implementation units makes an application potentially dependent on changes in versions of GNAT, and will generate a warning message. .. _`Ada.Characters.Latin_9_(a-chlat9.ads)`: -`Ada.Characters.Latin_9` (:file:`a-chlat9.ads`) -=============================================== +``Ada.Characters.Latin_9`` (:file:`a-chlat9.ads`) +================================================= .. index:: Ada.Characters.Latin_9 (a-chlat9.ads) .. index:: Latin_9 constants for Character -This child of `Ada.Characters` +This child of ``Ada.Characters`` provides a set of definitions corresponding to those in the -RM-defined package `Ada.Characters.Latin_1` but with the -few modifications required for `Latin-9` +RM-defined package ``Ada.Characters.Latin_1`` but with the +few modifications required for ``Latin-9`` The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). .. _`Ada.Characters.Wide_Latin_1_(a-cwila1.ads)`: -`Ada.Characters.Wide_Latin_1` (:file:`a-cwila1.ads`) -==================================================== +``Ada.Characters.Wide_Latin_1`` (:file:`a-cwila1.ads`) +====================================================== .. index:: Ada.Characters.Wide_Latin_1 (a-cwila1.ads) .. index:: Latin_1 constants for Wide_Character -This child of `Ada.Characters` +This child of ``Ada.Characters`` provides a set of definitions corresponding to those in the -RM-defined package `Ada.Characters.Latin_1` but with the -types of the constants being `Wide_Character` -instead of `Character`. The provision of such a package +RM-defined package ``Ada.Characters.Latin_1`` but with the +types of the constants being ``Wide_Character`` +instead of ``Character``. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). .. _`Ada.Characters.Wide_Latin_9_(a-cwila1.ads)`: -`Ada.Characters.Wide_Latin_9` (:file:`a-cwila1.ads`) -==================================================== +``Ada.Characters.Wide_Latin_9`` (:file:`a-cwila1.ads`) +====================================================== .. index:: Ada.Characters.Wide_Latin_9 (a-cwila1.ads) .. index:: Latin_9 constants for Wide_Character -This child of `Ada.Characters` +This child of ``Ada.Characters`` provides a set of definitions corresponding to those in the -GNAT defined package `Ada.Characters.Latin_9` but with the -types of the constants being `Wide_Character` -instead of `Character`. The provision of such a package +GNAT defined package ``Ada.Characters.Latin_9`` but with the +types of the constants being ``Wide_Character`` +instead of ``Character``. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). .. _`Ada.Characters.Wide_Wide_Latin_1_(a-chzla1.ads)`: -`Ada.Characters.Wide_Wide_Latin_1` (:file:`a-chzla1.ads`) -========================================================= +``Ada.Characters.Wide_Wide_Latin_1`` (:file:`a-chzla1.ads`) +=========================================================== .. index:: Ada.Characters.Wide_Wide_Latin_1 (a-chzla1.ads) .. index:: Latin_1 constants for Wide_Wide_Character -This child of `Ada.Characters` +This child of ``Ada.Characters`` provides a set of definitions corresponding to those in the -RM-defined package `Ada.Characters.Latin_1` but with the -types of the constants being `Wide_Wide_Character` -instead of `Character`. The provision of such a package +RM-defined package ``Ada.Characters.Latin_1`` but with the +types of the constants being ``Wide_Wide_Character`` +instead of ``Character``. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). .. _`Ada.Characters.Wide_Wide_Latin_9_(a-chzla9.ads)`: -`Ada.Characters.Wide_Wide_Latin_9` (:file:`a-chzla9.ads`) -========================================================= +``Ada.Characters.Wide_Wide_Latin_9`` (:file:`a-chzla9.ads`) +=========================================================== .. index:: Ada.Characters.Wide_Wide_Latin_9 (a-chzla9.ads) .. index:: Latin_9 constants for Wide_Wide_Character -This child of `Ada.Characters` +This child of ``Ada.Characters`` provides a set of definitions corresponding to those in the -GNAT defined package `Ada.Characters.Latin_9` but with the -types of the constants being `Wide_Wide_Character` -instead of `Character`. The provision of such a package +GNAT defined package ``Ada.Characters.Latin_9`` but with the +types of the constants being ``Wide_Wide_Character`` +instead of ``Character``. The provision of such a package is specifically authorized by the Ada Reference Manual (RM A.3.3(27)). .. _`Ada.Containers.Formal_Doubly_Linked_Lists_(a-cfdlli.ads)`: -`Ada.Containers.Formal_Doubly_Linked_Lists` (:file:`a-cfdlli.ads`) -================================================================== +``Ada.Containers.Formal_Doubly_Linked_Lists`` (:file:`a-cfdlli.ads`) +==================================================================== .. index:: Ada.Containers.Formal_Doubly_Linked_Lists (a-cfdlli.ads) .. index:: Formal container for doubly linked lists -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for doubly linked lists, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -139,14 +141,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Hashed_Maps_(a-cfhama.ads)`: -`Ada.Containers.Formal_Hashed_Maps` (:file:`a-cfhama.ads`) -========================================================== +``Ada.Containers.Formal_Hashed_Maps`` (:file:`a-cfhama.ads`) +============================================================ .. index:: Ada.Containers.Formal_Hashed_Maps (a-cfhama.ads) .. index:: Formal container for hashed maps -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for hashed maps, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -158,14 +160,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Hashed_Sets_(a-cfhase.ads)`: -`Ada.Containers.Formal_Hashed_Sets` (:file:`a-cfhase.ads`) -========================================================== +``Ada.Containers.Formal_Hashed_Sets`` (:file:`a-cfhase.ads`) +============================================================ .. index:: Ada.Containers.Formal_Hashed_Sets (a-cfhase.ads) .. index:: Formal container for hashed sets -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for hashed sets, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -177,14 +179,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Ordered_Maps_(a-cforma.ads)`: -`Ada.Containers.Formal_Ordered_Maps` (:file:`a-cforma.ads`) -=========================================================== +``Ada.Containers.Formal_Ordered_Maps`` (:file:`a-cforma.ads`) +============================================================= .. index:: Ada.Containers.Formal_Ordered_Maps (a-cforma.ads) .. index:: Formal container for ordered maps -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for ordered maps, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -196,14 +198,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Ordered_Sets_(a-cforse.ads)`: -`Ada.Containers.Formal_Ordered_Sets` (:file:`a-cforse.ads`) -=========================================================== +``Ada.Containers.Formal_Ordered_Sets`` (:file:`a-cforse.ads`) +============================================================= .. index:: Ada.Containers.Formal_Ordered_Sets (a-cforse.ads) .. index:: Formal container for ordered sets -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for ordered sets, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -215,14 +217,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Vectors_(a-cofove.ads)`: -`Ada.Containers.Formal_Vectors` (:file:`a-cofove.ads`) -====================================================== +``Ada.Containers.Formal_Vectors`` (:file:`a-cofove.ads`) +======================================================== .. index:: Ada.Containers.Formal_Vectors (a-cofove.ads) .. index:: Formal container for vectors -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for vectors, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -234,14 +236,14 @@ does not have the complex overhead required to detect cursor tampering. .. _`Ada.Containers.Formal_Indefinite_Vectors_(a-cfinve.ads)`: -`Ada.Containers.Formal_Indefinite_Vectors` (:file:`a-cfinve.ads`) -================================================================= +``Ada.Containers.Formal_Indefinite_Vectors`` (:file:`a-cfinve.ads`) +=================================================================== .. index:: Ada.Containers.Formal_Indefinite_Vectors (a-cfinve.ads) .. index:: Formal container for vectors -This child of `Ada.Containers` defines a modified version of the +This child of ``Ada.Containers`` defines a modified version of the Ada 2005 container for vectors of indefinite elements, meant to facilitate formal verification of code using such containers. The specification of this unit is compatible with SPARK 2014. @@ -251,35 +253,101 @@ in mind, it may well be generally useful in that it is a simplified more efficient version than the one defined in the standard. In particular it does not have the complex overhead required to detect cursor tampering. +.. _`Ada.Containers.Functional_Vectors_(a-cofuve.ads)`: + +``Ada.Containers.Functional_Vectors`` (:file:`a-cofuve.ads`) +================================================================= + +.. index:: Ada.Containers.Functional_Vectors (a-cofuve.ads) + +.. index:: Functional vectors + +This child of ``Ada.Containers`` defines immutable vectors. These +containers are unbounded and may contain indefinite elements. Furthermore, to +be usable in every context, they are neither controlled nor limited. As they +are functional, that is, no primitives are provided which would allow modifying +an existing container, these containers can still be used safely. + +Their API features functions creating new containers from existing ones. +As a consequence, these containers are highly inefficient. They are also +memory consuming, as the allocated memory is not reclaimed when the container +is no longer referenced. Thus, they should in general be used in ghost code +and annotations, so that they can be removed from the final executable. The +specification of this unit is compatible with SPARK 2014. + +.. _`Ada.Containers.Functional_Sets_(a-cofuse.ads)`: + +``Ada.Containers.Functional_Sets`` (:file:`a-cofuse.ads`) +================================================================= + +.. index:: Ada.Containers.Functional_Sets (a-cofuse.ads) + +.. index:: Functional sets + +This child of ``Ada.Containers`` defines immutable sets. These containers are +unbounded and may contain indefinite elements. Furthermore, to be usable in +every context, they are neither controlled nor limited. As they are functional, +that is, no primitives are provided which would allow modifying an existing +container, these containers can still be used safely. + +Their API features functions creating new containers from existing ones. +As a consequence, these containers are highly inefficient. They are also +memory consuming, as the allocated memory is not reclaimed when the container +is no longer referenced. Thus, they should in general be used in ghost code +and annotations, so that they can be removed from the final executable. The +specification of this unit is compatible with SPARK 2014. + +.. _`Ada.Containers.Functional_Maps_(a-cofuma.ads)`: + +``Ada.Containers.Functional_Maps`` (:file:`a-cofuma.ads`) +================================================================= + +.. index:: Ada.Containers.Functional_Maps (a-cofuma.ads) + +.. index:: Functional maps + +This child of ``Ada.Containers`` defines immutable maps. These containers are +unbounded and may contain indefinite elements. Furthermore, to be usable in +every context, they are neither controlled nor limited. As they are functional, +that is, no primitives are provided which would allow modifying an existing +container, these containers can still be used safely. + +Their API features functions creating new containers from existing ones. +As a consequence, these containers are highly inefficient. They are also +memory consuming, as the allocated memory is not reclaimed when the container +is no longer referenced. Thus, they should in general be used in ghost code +and annotations, so that they can be removed from the final executable. The +specification of this unit is compatible with SPARK 2014. + .. _`Ada.Containers.Bounded_Holders_(a-coboho.ads)`: -`Ada.Containers.Bounded_Holders` (:file:`a-coboho.ads`) -======================================================= +``Ada.Containers.Bounded_Holders`` (:file:`a-coboho.ads`) +========================================================= .. index:: Ada.Containers.Bounded_Holders (a-coboho.ads) .. index:: Formal container for vectors -This child of `Ada.Containers` defines a modified version of +This child of ``Ada.Containers`` defines a modified version of Indefinite_Holders that avoids heap allocation. .. _`Ada.Command_Line.Environment_(a-colien.ads)`: -`Ada.Command_Line.Environment` (:file:`a-colien.ads`) -===================================================== +``Ada.Command_Line.Environment`` (:file:`a-colien.ads`) +======================================================= .. index:: Ada.Command_Line.Environment (a-colien.ads) .. index:: Environment entries -This child of `Ada.Command_Line` +This child of ``Ada.Command_Line`` provides a mechanism for obtaining environment values on systems where this concept makes sense. .. _`Ada.Command_Line.Remove_(a-colire.ads)`: -`Ada.Command_Line.Remove` (:file:`a-colire.ads`) -================================================ +``Ada.Command_Line.Remove`` (:file:`a-colire.ads`) +================================================== .. index:: Ada.Command_Line.Remove (a-colire.ads) @@ -287,16 +355,16 @@ where this concept makes sense. .. index:: Command line, argument removal -This child of `Ada.Command_Line` +This child of ``Ada.Command_Line`` provides a mechanism for logically removing arguments from the argument list. Once removed, an argument is not visible -to further calls on the subprograms in `Ada.Command_Line` will not +to further calls on the subprograms in ``Ada.Command_Line`` will not see the removed argument. .. _`Ada.Command_Line.Response_File_(a-clrefi.ads)`: -`Ada.Command_Line.Response_File` (:file:`a-clrefi.ads`) -======================================================= +``Ada.Command_Line.Response_File`` (:file:`a-clrefi.ads`) +========================================================= .. index:: Ada.Command_Line.Response_File (a-clrefi.ads) @@ -306,42 +374,42 @@ see the removed argument. .. index:: Command line, handling long command lines -This child of `Ada.Command_Line` provides a mechanism facilities for +This child of ``Ada.Command_Line`` provides a mechanism facilities for getting command line arguments from a text file, called a "response file". Using a response file allow passing a set of arguments to an executable longer than the maximum allowed by the system on the command line. .. _`Ada.Direct_IO.C_Streams_(a-diocst.ads)`: -`Ada.Direct_IO.C_Streams` (:file:`a-diocst.ads`) -================================================ +``Ada.Direct_IO.C_Streams`` (:file:`a-diocst.ads`) +================================================== .. index:: Ada.Direct_IO.C_Streams (a-diocst.ads) .. index:: C Streams, Interfacing with Direct_IO This package provides subprograms that allow interfacing between -C streams and `Direct_IO`. The stream identifier can be +C streams and ``Direct_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Exceptions.Is_Null_Occurrence_(a-einuoc.ads)`: -`Ada.Exceptions.Is_Null_Occurrence` (:file:`a-einuoc.ads`) -========================================================== +``Ada.Exceptions.Is_Null_Occurrence`` (:file:`a-einuoc.ads`) +============================================================ .. index:: Ada.Exceptions.Is_Null_Occurrence (a-einuoc.ads) .. index:: Null_Occurrence, testing for This child subprogram provides a way of testing for the null -exception occurrence (`Null_Occurrence`) without raising +exception occurrence (``Null_Occurrence``) without raising an exception. .. _`Ada.Exceptions.Last_Chance_Handler_(a-elchha.ads)`: -`Ada.Exceptions.Last_Chance_Handler` (:file:`a-elchha.ads`) -=========================================================== +``Ada.Exceptions.Last_Chance_Handler`` (:file:`a-elchha.ads`) +============================================================= .. index:: Ada.Exceptions.Last_Chance_Handler (a-elchha.ads) @@ -353,49 +421,49 @@ terminating the program. Note that this subprogram never returns. .. _`Ada.Exceptions.Traceback_(a-exctra.ads)`: -`Ada.Exceptions.Traceback` (:file:`a-exctra.ads`) -================================================= +``Ada.Exceptions.Traceback`` (:file:`a-exctra.ads`) +=================================================== .. index:: Ada.Exceptions.Traceback (a-exctra.ads) .. index:: Traceback for Exception Occurrence -This child package provides the subprogram (`Tracebacks`) to +This child package provides the subprogram (``Tracebacks``) to give a traceback array of addresses based on an exception occurrence. .. _`Ada.Sequential_IO.C_Streams_(a-siocst.ads)`: -`Ada.Sequential_IO.C_Streams` (:file:`a-siocst.ads`) -==================================================== +``Ada.Sequential_IO.C_Streams`` (:file:`a-siocst.ads`) +====================================================== .. index:: Ada.Sequential_IO.C_Streams (a-siocst.ads) .. index:: C Streams, Interfacing with Sequential_IO This package provides subprograms that allow interfacing between -C streams and `Sequential_IO`. The stream identifier can be +C streams and ``Sequential_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Streams.Stream_IO.C_Streams_(a-ssicst.ads)`: -`Ada.Streams.Stream_IO.C_Streams` (:file:`a-ssicst.ads`) -======================================================== +``Ada.Streams.Stream_IO.C_Streams`` (:file:`a-ssicst.ads`) +========================================================== .. index:: Ada.Streams.Stream_IO.C_Streams (a-ssicst.ads) .. index:: C Streams, Interfacing with Stream_IO This package provides subprograms that allow interfacing between -C streams and `Stream_IO`. The stream identifier can be +C streams and ``Stream_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Strings.Unbounded.Text_IO_(a-suteio.ads)`: -`Ada.Strings.Unbounded.Text_IO` (:file:`a-suteio.ads`) -====================================================== +``Ada.Strings.Unbounded.Text_IO`` (:file:`a-suteio.ads`) +======================================================== .. index:: Ada.Strings.Unbounded.Text_IO (a-suteio.ads) @@ -409,8 +477,8 @@ with ordinary strings. .. _`Ada.Strings.Wide_Unbounded.Wide_Text_IO_(a-swuwti.ads)`: -`Ada.Strings.Wide_Unbounded.Wide_Text_IO` (:file:`a-swuwti.ads`) -================================================================ +``Ada.Strings.Wide_Unbounded.Wide_Text_IO`` (:file:`a-swuwti.ads`) +================================================================== .. index:: Ada.Strings.Wide_Unbounded.Wide_Text_IO (a-swuwti.ads) @@ -424,8 +492,8 @@ with ordinary wide strings. .. _`Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO_(a-szuzti.ads)`: -`Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO` (:file:`a-szuzti.ads`) -========================================================================== +``Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO`` (:file:`a-szuzti.ads`) +============================================================================ .. index:: Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO (a-szuzti.ads) @@ -439,22 +507,22 @@ with ordinary wide wide strings. .. _`Ada.Text_IO.C_Streams_(a-tiocst.ads)`: -`Ada.Text_IO.C_Streams` (:file:`a-tiocst.ads`) -============================================== +``Ada.Text_IO.C_Streams`` (:file:`a-tiocst.ads`) +================================================ .. index:: Ada.Text_IO.C_Streams (a-tiocst.ads) -.. index:: C Streams, Interfacing with `Text_IO` +.. index:: C Streams, Interfacing with ``Text_IO`` This package provides subprograms that allow interfacing between -C streams and `Text_IO`. The stream identifier can be +C streams and ``Text_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Text_IO.Reset_Standard_Files_(a-tirsfi.ads)`: -`Ada.Text_IO.Reset_Standard_Files` (:file:`a-tirsfi.ads`) -========================================================= +``Ada.Text_IO.Reset_Standard_Files`` (:file:`a-tirsfi.ads`) +=========================================================== .. index:: Ada.Text_IO.Reset_Standard_Files (a-tirsfi.ads) @@ -468,8 +536,8 @@ interactive). .. _`Ada.Wide_Characters.Unicode_(a-wichun.ads)`: -`Ada.Wide_Characters.Unicode` (:file:`a-wichun.ads`) -==================================================== +``Ada.Wide_Characters.Unicode`` (:file:`a-wichun.ads`) +====================================================== .. index:: Ada.Wide_Characters.Unicode (a-wichun.ads) @@ -480,22 +548,22 @@ Wide_Character values according to Unicode categories. .. _`Ada.Wide_Text_IO.C_Streams_(a-wtcstr.ads)`: -`Ada.Wide_Text_IO.C_Streams` (:file:`a-wtcstr.ads`) -=================================================== +``Ada.Wide_Text_IO.C_Streams`` (:file:`a-wtcstr.ads`) +===================================================== .. index:: Ada.Wide_Text_IO.C_Streams (a-wtcstr.ads) -.. index:: C Streams, Interfacing with `Wide_Text_IO` +.. index:: C Streams, Interfacing with ``Wide_Text_IO`` This package provides subprograms that allow interfacing between -C streams and `Wide_Text_IO`. The stream identifier can be +C streams and ``Wide_Text_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Wide_Text_IO.Reset_Standard_Files_(a-wrstfi.ads)`: -`Ada.Wide_Text_IO.Reset_Standard_Files` (:file:`a-wrstfi.ads`) -============================================================== +``Ada.Wide_Text_IO.Reset_Standard_Files`` (:file:`a-wrstfi.ads`) +================================================================ .. index:: Ada.Wide_Text_IO.Reset_Standard_Files (a-wrstfi.ads) @@ -509,8 +577,8 @@ interactive). .. _`Ada.Wide_Wide_Characters.Unicode_(a-zchuni.ads)`: -`Ada.Wide_Wide_Characters.Unicode` (:file:`a-zchuni.ads`) -========================================================= +``Ada.Wide_Wide_Characters.Unicode`` (:file:`a-zchuni.ads`) +=========================================================== .. index:: Ada.Wide_Wide_Characters.Unicode (a-zchuni.ads) @@ -521,22 +589,22 @@ Wide_Wide_Character values according to Unicode categories. .. _`Ada.Wide_Wide_Text_IO.C_Streams_(a-ztcstr.ads)`: -`Ada.Wide_Wide_Text_IO.C_Streams` (:file:`a-ztcstr.ads`) -======================================================== +``Ada.Wide_Wide_Text_IO.C_Streams`` (:file:`a-ztcstr.ads`) +========================================================== .. index:: Ada.Wide_Wide_Text_IO.C_Streams (a-ztcstr.ads) -.. index:: C Streams, Interfacing with `Wide_Wide_Text_IO` +.. index:: C Streams, Interfacing with ``Wide_Wide_Text_IO`` This package provides subprograms that allow interfacing between -C streams and `Wide_Wide_Text_IO`. The stream identifier can be +C streams and ``Wide_Wide_Text_IO``. The stream identifier can be extracted from a file opened on the Ada side, and an Ada file can be constructed from a stream opened on the C side. .. _`Ada.Wide_Wide_Text_IO.Reset_Standard_Files_(a-zrstfi.ads)`: -`Ada.Wide_Wide_Text_IO.Reset_Standard_Files` (:file:`a-zrstfi.ads`) -=================================================================== +``Ada.Wide_Wide_Text_IO.Reset_Standard_Files`` (:file:`a-zrstfi.ads`) +===================================================================== .. index:: Ada.Wide_Wide_Text_IO.Reset_Standard_Files (a-zrstfi.ads) @@ -550,8 +618,8 @@ redefined to be interactive). .. _`GNAT.Altivec_(g-altive.ads)`: -`GNAT.Altivec` (:file:`g-altive.ads`) -===================================== +``GNAT.Altivec`` (:file:`g-altive.ads`) +======================================= .. index:: GNAT.Altivec (g-altive.ads) @@ -563,8 +631,8 @@ binding. .. _`GNAT.Altivec.Conversions_(g-altcon.ads)`: -`GNAT.Altivec.Conversions` (:file:`g-altcon.ads`) -================================================= +``GNAT.Altivec.Conversions`` (:file:`g-altcon.ads`) +=================================================== .. index:: GNAT.Altivec.Conversions (g-altcon.ads) @@ -574,8 +642,8 @@ This package provides the Vector/View conversion routines. .. _`GNAT.Altivec.Vector_Operations_(g-alveop.ads)`: -`GNAT.Altivec.Vector_Operations` (:file:`g-alveop.ads`) -======================================================= +``GNAT.Altivec.Vector_Operations`` (:file:`g-alveop.ads`) +========================================================= .. index:: GNAT.Altivec.Vector_Operations (g-alveop.ads) @@ -588,8 +656,8 @@ is common to both bindings. .. _`GNAT.Altivec.Vector_Types_(g-alvety.ads)`: -`GNAT.Altivec.Vector_Types` (:file:`g-alvety.ads`) -================================================== +``GNAT.Altivec.Vector_Types`` (:file:`g-alvety.ads`) +==================================================== .. index:: GNAT.Altivec.Vector_Types (g-alvety.ads) @@ -600,8 +668,8 @@ to AltiVec facilities. .. _`GNAT.Altivec.Vector_Views_(g-alvevi.ads)`: -`GNAT.Altivec.Vector_Views` (:file:`g-alvevi.ads`) -================================================== +``GNAT.Altivec.Vector_Views`` (:file:`g-alvevi.ads`) +==================================================== .. index:: GNAT.Altivec.Vector_Views (g-alvevi.ads) @@ -615,8 +683,8 @@ objects. .. _`GNAT.Array_Split_(g-arrspl.ads)`: -`GNAT.Array_Split` (:file:`g-arrspl.ads`) -========================================= +``GNAT.Array_Split`` (:file:`g-arrspl.ads`) +=========================================== .. index:: GNAT.Array_Split (g-arrspl.ads) @@ -628,8 +696,8 @@ to the resulting slices. .. _`GNAT.AWK_(g-awk.ads)`: -`GNAT.AWK` (:file:`g-awk.ads`) -============================== +``GNAT.AWK`` (:file:`g-awk.ads`) +================================ .. index:: GNAT.AWK (g-awk.ads) @@ -643,21 +711,21 @@ where each record is a line and a field is a data element in this line. .. _`GNAT.Bind_Environment_(g-binenv.ads)`: -`GNAT.Bind_Environment` (:file:`g-binenv.ads`) -============================================== +``GNAT.Bind_Environment`` (:file:`g-binenv.ads`) +================================================ .. index:: GNAT.Bind_Environment (g-binenv.ads) .. index:: Bind environment Provides access to key=value associations captured at bind time. -These associations can be specified using the `-V` binder command +These associations can be specified using the :switch:`-V` binder command line switch. .. _`GNAT.Bounded_Buffers_(g-boubuf.ads)`: -`GNAT.Bounded_Buffers` (:file:`g-boubuf.ads`) -============================================= +``GNAT.Bounded_Buffers`` (:file:`g-boubuf.ads`) +=============================================== .. index:: GNAT.Bounded_Buffers (g-boubuf.ads) @@ -671,8 +739,8 @@ such as mailboxes. .. _`GNAT.Bounded_Mailboxes_(g-boumai.ads)`: -`GNAT.Bounded_Mailboxes` (:file:`g-boumai.ads`) -=============================================== +``GNAT.Bounded_Mailboxes`` (:file:`g-boumai.ads`) +================================================= .. index:: GNAT.Bounded_Mailboxes (g-boumai.ads) @@ -684,8 +752,8 @@ Provides a thread-safe asynchronous intertask mailbox communication facility. .. _`GNAT.Bubble_Sort_(g-bubsor.ads)`: -`GNAT.Bubble_Sort` (:file:`g-bubsor.ads`) -========================================= +``GNAT.Bubble_Sort`` (:file:`g-bubsor.ads`) +=========================================== .. index:: GNAT.Bubble_Sort (g-bubsor.ads) @@ -699,8 +767,8 @@ access-to-procedure values. .. _`GNAT.Bubble_Sort_A_(g-busora.ads)`: -`GNAT.Bubble_Sort_A` (:file:`g-busora.ads`) -=========================================== +``GNAT.Bubble_Sort_A`` (:file:`g-busora.ads`) +============================================= .. index:: GNAT.Bubble_Sort_A (g-busora.ads) @@ -711,12 +779,12 @@ access-to-procedure values. Provides a general implementation of bubble sort usable for sorting arbitrary data items. Move and comparison procedures are provided by passing access-to-procedure values. This is an older version, retained for -compatibility. Usually `GNAT.Bubble_Sort` will be preferable. +compatibility. Usually ``GNAT.Bubble_Sort`` will be preferable. .. _`GNAT.Bubble_Sort_G_(g-busorg.ads)`: -`GNAT.Bubble_Sort_G` (:file:`g-busorg.ads`) -=========================================== +``GNAT.Bubble_Sort_G`` (:file:`g-busorg.ads`) +============================================= .. index:: GNAT.Bubble_Sort_G (g-busorg.ads) @@ -724,15 +792,15 @@ compatibility. Usually `GNAT.Bubble_Sort` will be preferable. .. index:: Bubble sort -Similar to `Bubble_Sort_A` except that the move and sorting procedures +Similar to ``Bubble_Sort_A`` except that the move and sorting procedures are provided as generic parameters, this improves efficiency, especially if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. .. _`GNAT.Byte_Order_Mark_(g-byorma.ads)`: -`GNAT.Byte_Order_Mark` (:file:`g-byorma.ads`) -============================================= +``GNAT.Byte_Order_Mark`` (:file:`g-byorma.ads`) +=============================================== .. index:: GNAT.Byte_Order_Mark (g-byorma.ads) @@ -747,8 +815,8 @@ sequences for various UCS input formats. .. _`GNAT.Byte_Swapping_(g-bytswa.ads)`: -`GNAT.Byte_Swapping` (:file:`g-bytswa.ads`) -=========================================== +``GNAT.Byte_Swapping`` (:file:`g-bytswa.ads`) +============================================= .. index:: GNAT.Byte_Swapping (g-bytswa.ads) @@ -761,22 +829,22 @@ Machine-specific implementations are available in some cases. .. _`GNAT.Calendar_(g-calend.ads)`: -`GNAT.Calendar` (:file:`g-calend.ads`) -====================================== +``GNAT.Calendar`` (:file:`g-calend.ads`) +======================================== .. index:: GNAT.Calendar (g-calend.ads) .. index:: Calendar -Extends the facilities provided by `Ada.Calendar` to include handling -of days of the week, an extended `Split` and `Time_Of` capability. -Also provides conversion of `Ada.Calendar.Time` values to and from the -C `timeval` format. +Extends the facilities provided by ``Ada.Calendar`` to include handling +of days of the week, an extended ``Split`` and ``Time_Of`` capability. +Also provides conversion of ``Ada.Calendar.Time`` values to and from the +C ``timeval`` format. .. _`GNAT.Calendar.Time_IO_(g-catiio.ads)`: -`GNAT.Calendar.Time_IO` (:file:`g-catiio.ads`) -============================================== +``GNAT.Calendar.Time_IO`` (:file:`g-catiio.ads`) +================================================ .. index:: Calendar @@ -786,8 +854,8 @@ C `timeval` format. .. _`GNAT.CRC32_(g-crc32.ads)`: -`GNAT.CRC32` (:file:`g-crc32.ads`) -================================== +``GNAT.CRC32`` (:file:`g-crc32.ads`) +==================================== .. index:: GNAT.CRC32 (g-crc32.ads) @@ -803,23 +871,23 @@ Aug. 1988. Sarwate, D.V. .. _`GNAT.Case_Util_(g-casuti.ads)`: -`GNAT.Case_Util` (:file:`g-casuti.ads`) -======================================= +``GNAT.Case_Util`` (:file:`g-casuti.ads`) +========================================= .. index:: GNAT.Case_Util (g-casuti.ads) .. index:: Casing utilities -.. index:: Character handling (`GNAT.Case_Util`) +.. index:: Character handling (``GNAT.Case_Util``) A set of simple routines for handling upper and lower casing of strings without the overhead of the full casing tables -in `Ada.Characters.Handling`. +in ``Ada.Characters.Handling``. .. _`GNAT.CGI_(g-cgi.ads)`: -`GNAT.CGI` (:file:`g-cgi.ads`) -============================== +``GNAT.CGI`` (:file:`g-cgi.ads`) +================================ .. index:: GNAT.CGI (g-cgi.ads) @@ -833,8 +901,8 @@ with this table. .. _`GNAT.CGI.Cookie_(g-cgicoo.ads)`: -`GNAT.CGI.Cookie` (:file:`g-cgicoo.ads`) -======================================== +``GNAT.CGI.Cookie`` (:file:`g-cgicoo.ads`) +========================================== .. index:: GNAT.CGI.Cookie (g-cgicoo.ads) @@ -848,8 +916,8 @@ cookies (piece of information kept in the Web client software). .. _`GNAT.CGI.Debug_(g-cgideb.ads)`: -`GNAT.CGI.Debug` (:file:`g-cgideb.ads`) -======================================= +``GNAT.CGI.Debug`` (:file:`g-cgideb.ads`) +========================================= .. index:: GNAT.CGI.Debug (g-cgideb.ads) @@ -860,21 +928,21 @@ programs written in Ada. .. _`GNAT.Command_Line_(g-comlin.ads)`: -`GNAT.Command_Line` (:file:`g-comlin.ads`) -========================================== +``GNAT.Command_Line`` (:file:`g-comlin.ads`) +============================================ .. index:: GNAT.Command_Line (g-comlin.ads) .. index:: Command line -Provides a high level interface to `Ada.Command_Line` facilities, +Provides a high level interface to ``Ada.Command_Line`` facilities, including the ability to scan for named switches with optional parameters and expand file names using wild card notations. .. _`GNAT.Compiler_Version_(g-comver.ads)`: -`GNAT.Compiler_Version` (:file:`g-comver.ads`) -============================================== +``GNAT.Compiler_Version`` (:file:`g-comver.ads`) +================================================ .. index:: GNAT.Compiler_Version (g-comver.ads) @@ -890,8 +958,8 @@ of a partition). .. _`GNAT.Ctrl_C_(g-ctrl_c.ads)`: -`GNAT.Ctrl_C` (:file:`g-ctrl_c.ads`) -==================================== +``GNAT.Ctrl_C`` (:file:`g-ctrl_c.ads`) +====================================== .. index:: GNAT.Ctrl_C (g-ctrl_c.ads) @@ -901,8 +969,8 @@ Provides a simple interface to handle Ctrl-C keyboard events. .. _`GNAT.Current_Exception_(g-curexc.ads)`: -`GNAT.Current_Exception` (:file:`g-curexc.ads`) -=============================================== +``GNAT.Current_Exception`` (:file:`g-curexc.ads`) +================================================= .. index:: GNAT.Current_Exception (g-curexc.ads) @@ -918,8 +986,8 @@ obtaining information about exceptions provided by Ada 83 compilers. .. _`GNAT.Debug_Pools_(g-debpoo.ads)`: -`GNAT.Debug_Pools` (:file:`g-debpoo.ads`) -========================================= +``GNAT.Debug_Pools`` (:file:`g-debpoo.ads`) +=========================================== .. index:: GNAT.Debug_Pools (g-debpoo.ads) @@ -931,12 +999,12 @@ obtaining information about exceptions provided by Ada 83 compilers. Provide a debugging storage pools that helps tracking memory corruption problems. -See `The GNAT Debug_Pool Facility` section in the :title:`GNAT User's Guide`. +See ``The GNAT Debug_Pool Facility`` section in the :title:`GNAT User's Guide`. .. _`GNAT.Debug_Utilities_(g-debuti.ads)`: -`GNAT.Debug_Utilities` (:file:`g-debuti.ads`) -============================================= +``GNAT.Debug_Utilities`` (:file:`g-debuti.ads`) +=============================================== .. index:: GNAT.Debug_Utilities (g-debuti.ads) @@ -948,8 +1016,8 @@ for hexadecimal literals. .. _`GNAT.Decode_String_(g-decstr.ads)`: -`GNAT.Decode_String` (:file:`g-decstr.ads`) -=========================================== +``GNAT.Decode_String`` (:file:`g-decstr.ads`) +============================================= .. index:: GNAT.Decode_String (g-decstr.ads) @@ -972,8 +1040,8 @@ preinstantiation for UTF-8. See next entry. .. _`GNAT.Decode_UTF8_String_(g-deutst.ads)`: -`GNAT.Decode_UTF8_String` (:file:`g-deutst.ads`) -================================================ +``GNAT.Decode_UTF8_String`` (:file:`g-deutst.ads`) +================================================== .. index:: GNAT.Decode_UTF8_String (g-deutst.ads) @@ -993,8 +1061,8 @@ A preinstantiation of GNAT.Decode_Strings for UTF-8 encoding. .. _`GNAT.Directory_Operations_(g-dirope.ads)`: -`GNAT.Directory_Operations` (:file:`g-dirope.ads`) -================================================== +``GNAT.Directory_Operations`` (:file:`g-dirope.ads`) +==================================================== .. index:: GNAT.Directory_Operations (g-dirope.ads) @@ -1006,8 +1074,8 @@ directory. .. _`GNAT.Directory_Operations.Iteration_(g-diopit.ads)`: -`GNAT.Directory_Operations.Iteration` (:file:`g-diopit.ads`) -============================================================ +``GNAT.Directory_Operations.Iteration`` (:file:`g-diopit.ads`) +============================================================== .. index:: GNAT.Directory_Operations.Iteration (g-diopit.ads) @@ -1018,8 +1086,8 @@ for iterating through directories. .. _`GNAT.Dynamic_HTables_(g-dynhta.ads)`: -`GNAT.Dynamic_HTables` (:file:`g-dynhta.ads`) -============================================= +``GNAT.Dynamic_HTables`` (:file:`g-dynhta.ads`) +=============================================== .. index:: GNAT.Dynamic_HTables (g-dynhta.ads) @@ -1029,15 +1097,15 @@ A generic implementation of hash tables that can be used to hash arbitrary data. Provided in two forms, a simple form with built in hash functions, and a more complex form in which the hash function is supplied. -This package provides a facility similar to that of `GNAT.HTable`, +This package provides a facility similar to that of ``GNAT.HTable``, except that this package declares a type that can be used to define dynamic instances of the hash table, while an instantiation of -`GNAT.HTable` creates a single instance of the hash table. +``GNAT.HTable`` creates a single instance of the hash table. .. _`GNAT.Dynamic_Tables_(g-dyntab.ads)`: -`GNAT.Dynamic_Tables` (:file:`g-dyntab.ads`) -============================================ +``GNAT.Dynamic_Tables`` (:file:`g-dyntab.ads`) +============================================== .. index:: GNAT.Dynamic_Tables (g-dyntab.ads) @@ -1048,15 +1116,15 @@ dynamic instances of the hash table, while an instantiation of A generic package providing a single dimension array abstraction where the length of the array can be dynamically modified. -This package provides a facility similar to that of `GNAT.Table`, +This package provides a facility similar to that of ``GNAT.Table``, except that this package declares a type that can be used to define dynamic instances of the table, while an instantiation of -`GNAT.Table` creates a single instance of the table type. +``GNAT.Table`` creates a single instance of the table type. .. _`GNAT.Encode_String_(g-encstr.ads)`: -`GNAT.Encode_String` (:file:`g-encstr.ads`) -=========================================== +``GNAT.Encode_String`` (:file:`g-encstr.ads`) +============================================= .. index:: GNAT.Encode_String (g-encstr.ads) @@ -1077,8 +1145,8 @@ Note there is a preinstantiation for UTF-8. See next entry. .. _`GNAT.Encode_UTF8_String_(g-enutst.ads)`: -`GNAT.Encode_UTF8_String` (:file:`g-enutst.ads`) -================================================ +``GNAT.Encode_UTF8_String`` (:file:`g-enutst.ads`) +================================================== .. index:: GNAT.Encode_UTF8_String (g-enutst.ads) @@ -1098,8 +1166,8 @@ A preinstantiation of GNAT.Encode_Strings for UTF-8 encoding. .. _`GNAT.Exception_Actions_(g-excact.ads)`: -`GNAT.Exception_Actions` (:file:`g-excact.ads`) -=============================================== +``GNAT.Exception_Actions`` (:file:`g-excact.ads`) +================================================= .. index:: GNAT.Exception_Actions (g-excact.ads) @@ -1111,8 +1179,8 @@ can be used for instance to force a core dump to ease debugging. .. _`GNAT.Exception_Traces_(g-exctra.ads)`: -`GNAT.Exception_Traces` (:file:`g-exctra.ads`) -============================================== +``GNAT.Exception_Traces`` (:file:`g-exctra.ads`) +================================================ .. index:: GNAT.Exception_Traces (g-exctra.ads) @@ -1125,8 +1193,8 @@ occurrences. .. _`GNAT.Exceptions_(g-expect.ads)`: -`GNAT.Exceptions` (:file:`g-expect.ads`) -======================================== +``GNAT.Exceptions`` (:file:`g-expect.ads`) +========================================== .. index:: GNAT.Exceptions (g-expect.ads) @@ -1136,16 +1204,16 @@ occurrences. Normally it is not possible to raise an exception with a message from a subprogram in a pure package, since the -necessary types and subprograms are in `Ada.Exceptions` -which is not a pure unit. `GNAT.Exceptions` provides a +necessary types and subprograms are in ``Ada.Exceptions`` +which is not a pure unit. ``GNAT.Exceptions`` provides a facility for getting around this limitation for a few predefined exceptions, and for example allow raising -`Constraint_Error` with a message from a pure subprogram. +``Constraint_Error`` with a message from a pure subprogram. .. _`GNAT.Expect_(g-expect.ads)`: -`GNAT.Expect` (:file:`g-expect.ads`) -==================================== +``GNAT.Expect`` (:file:`g-expect.ads`) +====================================== .. index:: GNAT.Expect (g-expect.ads) @@ -1153,27 +1221,27 @@ Provides a set of subprograms similar to what is available with the standard Tcl Expect tool. It allows you to easily spawn and communicate with an external process. You can send commands or inputs to the process, and compare the output -with some expected regular expression. Currently `GNAT.Expect` +with some expected regular expression. Currently ``GNAT.Expect`` is implemented on all native GNAT ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. .. _`GNAT.Expect.TTY_(g-exptty.ads)`: -`GNAT.Expect.TTY` (:file:`g-exptty.ads`) -======================================== +``GNAT.Expect.TTY`` (:file:`g-exptty.ads`) +========================================== .. index:: GNAT.Expect.TTY (g-exptty.ads) As GNAT.Expect but using pseudo-terminal. -Currently `GNAT.Expect.TTY` is implemented on all native GNAT +Currently ``GNAT.Expect.TTY`` is implemented on all native GNAT ports. It is not implemented for cross ports, and in particular is not implemented for VxWorks or LynxOS. .. _`GNAT.Float_Control_(g-flocon.ads)`: -`GNAT.Float_Control` (:file:`g-flocon.ads`) -=========================================== +``GNAT.Float_Control`` (:file:`g-flocon.ads`) +============================================= .. index:: GNAT.Float_Control (g-flocon.ads) @@ -1186,8 +1254,8 @@ in this package can be used to reestablish the required mode. .. _`GNAT.Formatted_String_(g-forstr.ads)`: -`GNAT.Formatted_String` (:file:`g-forstr.ads`) -============================================== +``GNAT.Formatted_String`` (:file:`g-forstr.ads`) +================================================ .. index:: GNAT.Formatted_String (g-forstr.ads) @@ -1201,8 +1269,8 @@ formatted string. .. _`GNAT.Heap_Sort_(g-heasor.ads)`: -`GNAT.Heap_Sort` (:file:`g-heasor.ads`) -======================================= +``GNAT.Heap_Sort`` (:file:`g-heasor.ads`) +========================================= .. index:: GNAT.Heap_Sort (g-heasor.ads) @@ -1215,8 +1283,8 @@ that performs approximately N*log(N) comparisons in the worst case. .. _`GNAT.Heap_Sort_A_(g-hesora.ads)`: -`GNAT.Heap_Sort_A` (:file:`g-hesora.ads`) -========================================= +``GNAT.Heap_Sort_A`` (:file:`g-hesora.ads`) +=========================================== .. index:: GNAT.Heap_Sort_A (g-hesora.ads) @@ -1226,27 +1294,27 @@ Provides a general implementation of heap sort usable for sorting arbitrary data items. Move and comparison procedures are provided by passing access-to-procedure values. The algorithm used is a modified heap sort that performs approximately N*log(N) comparisons in the worst case. -This differs from `GNAT.Heap_Sort` in having a less convenient +This differs from ``GNAT.Heap_Sort`` in having a less convenient interface, but may be slightly more efficient. .. _`GNAT.Heap_Sort_G_(g-hesorg.ads)`: -`GNAT.Heap_Sort_G` (:file:`g-hesorg.ads`) -========================================= +``GNAT.Heap_Sort_G`` (:file:`g-hesorg.ads`) +=========================================== .. index:: GNAT.Heap_Sort_G (g-hesorg.ads) .. index:: Sorting -Similar to `Heap_Sort_A` except that the move and sorting procedures +Similar to ``Heap_Sort_A`` except that the move and sorting procedures are provided as generic parameters, this improves efficiency, especially if the procedures can be inlined, at the expense of duplicating code for multiple instantiations. .. _`GNAT.HTable_(g-htable.ads)`: -`GNAT.HTable` (:file:`g-htable.ads`) -==================================== +``GNAT.HTable`` (:file:`g-htable.ads`) +====================================== .. index:: GNAT.HTable (g-htable.ads) @@ -1258,8 +1326,8 @@ allowing arbitrary dynamic hash tables. .. _`GNAT.IO_(g-io.ads)`: -`GNAT.IO` (:file:`g-io.ads`) -============================ +``GNAT.IO`` (:file:`g-io.ads`) +============================== .. index:: GNAT.IO (g-io.ads) @@ -1274,8 +1342,8 @@ Standard_Output or Standard_Error. .. _`GNAT.IO_Aux_(g-io_aux.ads)`: -`GNAT.IO_Aux` (:file:`g-io_aux.ads`) -==================================== +``GNAT.IO_Aux`` (:file:`g-io_aux.ads`) +====================================== .. index:: GNAT.IO_Aux (g-io_aux.ads) @@ -1288,8 +1356,8 @@ for whether a file exists, and functions for reading a line of text. .. _`GNAT.Lock_Files_(g-locfil.ads)`: -`GNAT.Lock_Files` (:file:`g-locfil.ads`) -======================================== +``GNAT.Lock_Files`` (:file:`g-locfil.ads`) +========================================== .. index:: GNAT.Lock_Files (g-locfil.ads) @@ -1302,32 +1370,32 @@ providing program level synchronization. .. _`GNAT.MBBS_Discrete_Random_(g-mbdira.ads)`: -`GNAT.MBBS_Discrete_Random` (:file:`g-mbdira.ads`) -================================================== +``GNAT.MBBS_Discrete_Random`` (:file:`g-mbdira.ads`) +==================================================== .. index:: GNAT.MBBS_Discrete_Random (g-mbdira.ads) .. index:: Random number generation -The original implementation of `Ada.Numerics.Discrete_Random`. Uses +The original implementation of ``Ada.Numerics.Discrete_Random``. Uses a modified version of the Blum-Blum-Shub generator. .. _`GNAT.MBBS_Float_Random_(g-mbflra.ads)`: -`GNAT.MBBS_Float_Random` (:file:`g-mbflra.ads`) -=============================================== +``GNAT.MBBS_Float_Random`` (:file:`g-mbflra.ads`) +================================================= .. index:: GNAT.MBBS_Float_Random (g-mbflra.ads) .. index:: Random number generation -The original implementation of `Ada.Numerics.Float_Random`. Uses +The original implementation of ``Ada.Numerics.Float_Random``. Uses a modified version of the Blum-Blum-Shub generator. .. _`GNAT.MD5_(g-md5.ads)`: -`GNAT.MD5` (:file:`g-md5.ads`) -============================== +``GNAT.MD5`` (:file:`g-md5.ads`) +================================ .. index:: GNAT.MD5 (g-md5.ads) @@ -1339,8 +1407,8 @@ FIPS PUB 198. .. _`GNAT.Memory_Dump_(g-memdum.ads)`: -`GNAT.Memory_Dump` (:file:`g-memdum.ads`) -========================================= +``GNAT.Memory_Dump`` (:file:`g-memdum.ads`) +=========================================== .. index:: GNAT.Memory_Dump (g-memdum.ads) @@ -1352,8 +1420,8 @@ output. .. _`GNAT.Most_Recent_Exception_(g-moreex.ads)`: -`GNAT.Most_Recent_Exception` (:file:`g-moreex.ads`) -=================================================== +``GNAT.Most_Recent_Exception`` (:file:`g-moreex.ads`) +===================================================== .. index:: GNAT.Most_Recent_Exception (g-moreex.ads) @@ -1365,8 +1433,8 @@ Ada 83 implementation dependent extensions. .. _`GNAT.OS_Lib_(g-os_lib.ads)`: -`GNAT.OS_Lib` (:file:`g-os_lib.ads`) -==================================== +``GNAT.OS_Lib`` (:file:`g-os_lib.ads`) +====================================== .. index:: GNAT.OS_Lib (g-os_lib.ads) @@ -1381,8 +1449,8 @@ and error return codes. .. _`GNAT.Perfect_Hash_Generators_(g-pehage.ads)`: -`GNAT.Perfect_Hash_Generators` (:file:`g-pehage.ads`) -===================================================== +``GNAT.Perfect_Hash_Generators`` (:file:`g-pehage.ads`) +======================================================= .. index:: GNAT.Perfect_Hash_Generators (g-pehage.ads) @@ -1399,8 +1467,8 @@ convenient for use with realtime applications. .. _`GNAT.Random_Numbers_(g-rannum.ads)`: -`GNAT.Random_Numbers` (:file:`g-rannum.ads`) -============================================ +``GNAT.Random_Numbers`` (:file:`g-rannum.ads`) +============================================== .. index:: GNAT.Random_Numbers (g-rannum.ads) @@ -1411,8 +1479,8 @@ standard Ada library and are more convenient to use. .. _`GNAT.Regexp_(g-regexp.ads)`: -`GNAT.Regexp` (:file:`g-regexp.ads`) -==================================== +``GNAT.Regexp`` (:file:`g-regexp.ads`) +====================================== .. index:: GNAT.Regexp (g-regexp.ads) @@ -1427,8 +1495,8 @@ suitable for 'file globbing' applications. .. _`GNAT.Registry_(g-regist.ads)`: -`GNAT.Registry` (:file:`g-regist.ads`) -====================================== +``GNAT.Registry`` (:file:`g-regist.ads`) +======================================== .. index:: GNAT.Registry (g-regist.ads) @@ -1441,8 +1509,8 @@ package provided with the Win32Ada binding .. _`GNAT.Regpat_(g-regpat.ads)`: -`GNAT.Regpat` (:file:`g-regpat.ads`) -==================================== +``GNAT.Regpat`` (:file:`g-regpat.ads`) +====================================== .. index:: GNAT.Regpat (g-regpat.ads) @@ -1456,8 +1524,8 @@ Henry Spencer (and binary compatible with this C library). .. _`GNAT.Rewrite_Data_(g-rewdat.ads)`: -`GNAT.Rewrite_Data` (:file:`g-rewdat.ads`) -========================================== +``GNAT.Rewrite_Data`` (:file:`g-rewdat.ads`) +============================================ .. index:: GNAT.Rewrite_Data (g-rewdat.ads) @@ -1470,8 +1538,8 @@ this interface usable for large files or socket streams. .. _`GNAT.Secondary_Stack_Info_(g-sestin.ads)`: -`GNAT.Secondary_Stack_Info` (:file:`g-sestin.ads`) -================================================== +``GNAT.Secondary_Stack_Info`` (:file:`g-sestin.ads`) +==================================================== .. index:: GNAT.Secondary_Stack_Info (g-sestin.ads) @@ -1482,8 +1550,8 @@ secondary stack. .. _`GNAT.Semaphores_(g-semaph.ads)`: -`GNAT.Semaphores` (:file:`g-semaph.ads`) -======================================== +``GNAT.Semaphores`` (:file:`g-semaph.ads`) +========================================== .. index:: GNAT.Semaphores (g-semaph.ads) @@ -1493,8 +1561,8 @@ Provides classic counting and binary semaphores using protected types. .. _`GNAT.Serial_Communications_(g-sercom.ads)`: -`GNAT.Serial_Communications` (:file:`g-sercom.ads`) -=================================================== +``GNAT.Serial_Communications`` (:file:`g-sercom.ads`) +===================================================== .. index:: GNAT.Serial_Communications (g-sercom.ads) @@ -1505,8 +1573,8 @@ port. This is only supported on GNU/Linux and Windows. .. _`GNAT.SHA1_(g-sha1.ads)`: -`GNAT.SHA1` (:file:`g-sha1.ads`) -================================ +``GNAT.SHA1`` (:file:`g-sha1.ads`) +================================== .. index:: GNAT.SHA1 (g-sha1.ads) @@ -1518,8 +1586,8 @@ in RFC 2104 and FIPS PUB 198. .. _`GNAT.SHA224_(g-sha224.ads)`: -`GNAT.SHA224` (:file:`g-sha224.ads`) -==================================== +``GNAT.SHA224`` (:file:`g-sha224.ads`) +====================================== .. index:: GNAT.SHA224 (g-sha224.ads) @@ -1531,8 +1599,8 @@ in RFC 2104 and FIPS PUB 198. .. _`GNAT.SHA256_(g-sha256.ads)`: -`GNAT.SHA256` (:file:`g-sha256.ads`) -==================================== +``GNAT.SHA256`` (:file:`g-sha256.ads`) +====================================== .. index:: GNAT.SHA256 (g-sha256.ads) @@ -1544,8 +1612,8 @@ in RFC 2104 and FIPS PUB 198. .. _`GNAT.SHA384_(g-sha384.ads)`: -`GNAT.SHA384` (:file:`g-sha384.ads`) -==================================== +``GNAT.SHA384`` (:file:`g-sha384.ads`) +====================================== .. index:: GNAT.SHA384 (g-sha384.ads) @@ -1557,8 +1625,8 @@ in RFC 2104 and FIPS PUB 198. .. _`GNAT.SHA512_(g-sha512.ads)`: -`GNAT.SHA512` (:file:`g-sha512.ads`) -==================================== +``GNAT.SHA512`` (:file:`g-sha512.ads`) +====================================== .. index:: GNAT.SHA512 (g-sha512.ads) @@ -1570,8 +1638,8 @@ in RFC 2104 and FIPS PUB 198. .. _`GNAT.Signals_(g-signal.ads)`: -`GNAT.Signals` (:file:`g-signal.ads`) -===================================== +``GNAT.Signals`` (:file:`g-signal.ads`) +======================================= .. index:: GNAT.Signals (g-signal.ads) @@ -1582,8 +1650,8 @@ targets. .. _`GNAT.Sockets_(g-socket.ads)`: -`GNAT.Sockets` (:file:`g-socket.ads`) -===================================== +``GNAT.Sockets`` (:file:`g-socket.ads`) +======================================= .. index:: GNAT.Sockets (g-socket.ads) @@ -1591,14 +1659,14 @@ targets. A high level and portable interface to develop sockets based applications. This package is based on the sockets thin binding found in -`GNAT.Sockets.Thin`. Currently `GNAT.Sockets` is implemented +``GNAT.Sockets.Thin``. Currently ``GNAT.Sockets`` is implemented on all native GNAT ports and on VxWorks cross prots. It is not implemented for the LynxOS cross port. .. _`GNAT.Source_Info_(g-souinf.ads)`: -`GNAT.Source_Info` (:file:`g-souinf.ads`) -========================================= +``GNAT.Source_Info`` (:file:`g-souinf.ads`) +=========================================== .. index:: GNAT.Source_Info (g-souinf.ads) @@ -1607,12 +1675,12 @@ the LynxOS cross port. Provides subprograms that give access to source code information known at compile time, such as the current file name and line number. Also provides subprograms yielding the date and time of the current compilation (like the -C macros `__DATE__` and `__TIME__`) +C macros ``__DATE__`` and ``__TIME__``) .. _`GNAT.Spelling_Checker_(g-speche.ads)`: -`GNAT.Spelling_Checker` (:file:`g-speche.ads`) -============================================== +``GNAT.Spelling_Checker`` (:file:`g-speche.ads`) +================================================ .. index:: GNAT.Spelling_Checker (g-speche.ads) @@ -1623,8 +1691,8 @@ near misspelling of another string. .. _`GNAT.Spelling_Checker_Generic_(g-spchge.ads)`: -`GNAT.Spelling_Checker_Generic` (:file:`g-spchge.ads`) -====================================================== +``GNAT.Spelling_Checker_Generic`` (:file:`g-spchge.ads`) +======================================================== .. index:: GNAT.Spelling_Checker_Generic (g-spchge.ads) @@ -1636,8 +1704,8 @@ string. .. _`GNAT.Spitbol.Patterns_(g-spipat.ads)`: -`GNAT.Spitbol.Patterns` (:file:`g-spipat.ads`) -============================================== +``GNAT.Spitbol.Patterns`` (:file:`g-spipat.ads`) +================================================ .. index:: GNAT.Spitbol.Patterns (g-spipat.ads) @@ -1652,8 +1720,8 @@ efficient algorithm developed by Robert Dewar for the SPITBOL system. .. _`GNAT.Spitbol_(g-spitbo.ads)`: -`GNAT.Spitbol` (:file:`g-spitbo.ads`) -===================================== +``GNAT.Spitbol`` (:file:`g-spitbo.ads`) +======================================= .. index:: GNAT.Spitbol (g-spitbo.ads) @@ -1667,8 +1735,8 @@ the SNOBOL4 TABLE function. .. _`GNAT.Spitbol.Table_Boolean_(g-sptabo.ads)`: -`GNAT.Spitbol.Table_Boolean` (:file:`g-sptabo.ads`) -=================================================== +``GNAT.Spitbol.Table_Boolean`` (:file:`g-sptabo.ads`) +===================================================== .. index:: GNAT.Spitbol.Table_Boolean (g-sptabo.ads) @@ -1676,14 +1744,14 @@ the SNOBOL4 TABLE function. .. index:: SPITBOL Tables -A library level of instantiation of `GNAT.Spitbol.Patterns.Table` -for type `Standard.Boolean`, giving an implementation of sets of +A library level of instantiation of ``GNAT.Spitbol.Patterns.Table`` +for type ``Standard.Boolean``, giving an implementation of sets of string values. .. _`GNAT.Spitbol.Table_Integer_(g-sptain.ads)`: -`GNAT.Spitbol.Table_Integer` (:file:`g-sptain.ads`) -=================================================== +``GNAT.Spitbol.Table_Integer`` (:file:`g-sptain.ads`) +===================================================== .. index:: GNAT.Spitbol.Table_Integer (g-sptain.ads) @@ -1693,14 +1761,14 @@ string values. .. index:: SPITBOL Tables -A library level of instantiation of `GNAT.Spitbol.Patterns.Table` -for type `Standard.Integer`, giving an implementation of maps +A library level of instantiation of ``GNAT.Spitbol.Patterns.Table`` +for type ``Standard.Integer``, giving an implementation of maps from string to integer values. .. _`GNAT.Spitbol.Table_VString_(g-sptavs.ads)`: -`GNAT.Spitbol.Table_VString` (:file:`g-sptavs.ads`) -=================================================== +``GNAT.Spitbol.Table_VString`` (:file:`g-sptavs.ads`) +===================================================== .. index:: GNAT.Spitbol.Table_VString (g-sptavs.ads) @@ -1710,14 +1778,14 @@ from string to integer values. .. index:: SPITBOL Tables -A library level of instantiation of `GNAT.Spitbol.Patterns.Table` for +A library level of instantiation of ``GNAT.Spitbol.Patterns.Table`` for a variable length string type, giving an implementation of general maps from strings to strings. .. _`GNAT.SSE_(g-sse.ads)`: -`GNAT.SSE` (:file:`g-sse.ads`) -============================== +``GNAT.SSE`` (:file:`g-sse.ads`) +================================ .. index:: GNAT.SSE (g-sse.ads) @@ -1728,8 +1796,8 @@ introduction to the binding contents and use. .. _`GNAT.SSE.Vector_Types_(g-ssvety.ads)`: -`GNAT.SSE.Vector_Types` (:file:`g-ssvety.ads`) -============================================== +``GNAT.SSE.Vector_Types`` (:file:`g-ssvety.ads`) +================================================ .. index:: GNAT.SSE.Vector_Types (g-ssvety.ads) @@ -1737,8 +1805,8 @@ SSE vector types for use with SSE related intrinsics. .. _`GNAT.String_Hash(g-strhas.ads)`: -`GNAT.String_Hash` (:file:`g-strhas.ads`) -========================================= +``GNAT.String_Hash`` (:file:`g-strhas.ads`) +=========================================== .. index:: GNAT.String_Hash (g-strhas.ads) @@ -1749,8 +1817,8 @@ type and the hash result type are parameters. .. _`GNAT.Strings_(g-string.ads)`: -`GNAT.Strings` (:file:`g-string.ads`) -===================================== +``GNAT.Strings`` (:file:`g-string.ads`) +======================================= .. index:: GNAT.Strings (g-string.ads) @@ -1759,8 +1827,8 @@ defines a string access and an array of string access types. .. _`GNAT.String_Split_(g-strspl.ads)`: -`GNAT.String_Split` (:file:`g-strspl.ads`) -========================================== +``GNAT.String_Split`` (:file:`g-strspl.ads`) +============================================ .. index:: GNAT.String_Split (g-strspl.ads) @@ -1769,12 +1837,12 @@ defines a string access and an array of string access types. Useful string manipulation routines: given a set of separators, split a string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from -`GNAT.Array_Split`. +``GNAT.Array_Split``. .. _`GNAT.Table_(g-table.ads)`: -`GNAT.Table` (:file:`g-table.ads`) -================================== +``GNAT.Table`` (:file:`g-table.ads`) +==================================== .. index:: GNAT.Table (g-table.ads) @@ -1785,15 +1853,15 @@ to the resulting slices. This package is instantiated from A generic package providing a single dimension array abstraction where the length of the array can be dynamically modified. -This package provides a facility similar to that of `GNAT.Dynamic_Tables`, +This package provides a facility similar to that of ``GNAT.Dynamic_Tables``, except that this package declares a single instance of the table type, -while an instantiation of `GNAT.Dynamic_Tables` creates a type that can be +while an instantiation of ``GNAT.Dynamic_Tables`` creates a type that can be used to define dynamic instances of the table. .. _`GNAT.Task_Lock_(g-tasloc.ads)`: -`GNAT.Task_Lock` (:file:`g-tasloc.ads`) -======================================= +``GNAT.Task_Lock`` (:file:`g-tasloc.ads`) +========================================= .. index:: GNAT.Task_Lock (g-tasloc.ads) @@ -1809,8 +1877,8 @@ between tasks is very rarely expected. .. _`GNAT.Time_Stamp_(g-timsta.ads)`: -`GNAT.Time_Stamp` (:file:`g-timsta.ads`) -======================================== +``GNAT.Time_Stamp`` (:file:`g-timsta.ads`) +========================================== .. index:: GNAT.Time_Stamp (g-timsta.ads) @@ -1824,8 +1892,8 @@ routine with minimal code and there are no dependencies on any other unit. .. _`GNAT.Threads_(g-thread.ads)`: -`GNAT.Threads` (:file:`g-thread.ads`) -===================================== +``GNAT.Threads`` (:file:`g-thread.ads`) +======================================= .. index:: GNAT.Threads (g-thread.ads) @@ -1840,8 +1908,8 @@ environment which then accesses Ada code. .. _`GNAT.Traceback_(g-traceb.ads)`: -`GNAT.Traceback` (:file:`g-traceb.ads`) -======================================= +``GNAT.Traceback`` (:file:`g-traceb.ads`) +========================================= .. index:: GNAT.Traceback (g-traceb.ads) @@ -1852,8 +1920,8 @@ in various debugging situations. .. _`GNAT.Traceback.Symbolic_(g-trasym.ads)`: -`GNAT.Traceback.Symbolic` (:file:`g-trasym.ads`) -================================================ +``GNAT.Traceback.Symbolic`` (:file:`g-trasym.ads`) +================================================== .. index:: GNAT.Traceback.Symbolic (g-trasym.ads) @@ -1861,17 +1929,17 @@ in various debugging situations. .. _`GNAT.UTF_32_(g-table.ads)`: -`GNAT.UTF_32` (:file:`g-table.ads`) -=================================== +``GNAT.UTF_32`` (:file:`g-table.ads`) +===================================== .. index:: GNAT.UTF_32 (g-table.ads) .. index:: Wide character codes This is a package intended to be used in conjunction with the -`Wide_Character` type in Ada 95 and the -`Wide_Wide_Character` type in Ada 2005 (available -in `GNAT` in Ada 2005 mode). This package contains +``Wide_Character`` type in Ada 95 and the +``Wide_Wide_Character`` type in Ada 2005 (available +in ``GNAT`` in Ada 2005 mode). This package contains Unicode categorization routines, as well as lexical categorization routines corresponding to the Ada 2005 lexical rules for identifiers and strings, and also a @@ -1880,8 +1948,8 @@ the Ada 2005 rules for identifier equivalence. .. _`GNAT.Wide_Spelling_Checker_(g-u3spch.ads)`: -`GNAT.Wide_Spelling_Checker` (:file:`g-u3spch.ads`) -=================================================== +``GNAT.Wide_Spelling_Checker`` (:file:`g-u3spch.ads`) +===================================================== .. index:: GNAT.Wide_Spelling_Checker (g-u3spch.ads) @@ -1893,8 +1961,8 @@ using the UTF_32_String type defined in System.Wch_Cnv. .. _`GNAT.Wide_Spelling_Checker_(g-wispch.ads)`: -`GNAT.Wide_Spelling_Checker` (:file:`g-wispch.ads`) -=================================================== +``GNAT.Wide_Spelling_Checker`` (:file:`g-wispch.ads`) +===================================================== .. index:: GNAT.Wide_Spelling_Checker (g-wispch.ads) @@ -1905,8 +1973,8 @@ near misspelling of another wide string. .. _`GNAT.Wide_String_Split_(g-wistsp.ads)`: -`GNAT.Wide_String_Split` (:file:`g-wistsp.ads`) -=============================================== +``GNAT.Wide_String_Split`` (:file:`g-wistsp.ads`) +================================================= .. index:: GNAT.Wide_String_Split (g-wistsp.ads) @@ -1915,12 +1983,12 @@ near misspelling of another wide string. Useful wide string manipulation routines: given a set of separators, split a wide string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from -`GNAT.Array_Split`. +``GNAT.Array_Split``. .. _`GNAT.Wide_Wide_Spelling_Checker_(g-zspche.ads)`: -`GNAT.Wide_Wide_Spelling_Checker` (:file:`g-zspche.ads`) -======================================================== +``GNAT.Wide_Wide_Spelling_Checker`` (:file:`g-zspche.ads`) +========================================================== .. index:: GNAT.Wide_Wide_Spelling_Checker (g-zspche.ads) @@ -1931,8 +1999,8 @@ near misspelling of another wide wide string. .. _`GNAT.Wide_Wide_String_Split_(g-zistsp.ads)`: -`GNAT.Wide_Wide_String_Split` (:file:`g-zistsp.ads`) -==================================================== +``GNAT.Wide_Wide_String_Split`` (:file:`g-zistsp.ads`) +====================================================== .. index:: GNAT.Wide_Wide_String_Split (g-zistsp.ads) @@ -1941,12 +2009,12 @@ near misspelling of another wide wide string. Useful wide wide string manipulation routines: given a set of separators, split a wide wide string wherever the separators appear, and provide direct access to the resulting slices. This package is instantiated from -`GNAT.Array_Split`. +``GNAT.Array_Split``. .. _`Interfaces.C.Extensions_(i-cexten.ads)`: -`Interfaces.C.Extensions` (:file:`i-cexten.ads`) -================================================ +``Interfaces.C.Extensions`` (:file:`i-cexten.ads`) +================================================== .. index:: Interfaces.C.Extensions (i-cexten.ads) @@ -1956,8 +2024,8 @@ to C libraries. .. _`Interfaces.C.Streams_(i-cstrea.ads)`: -`Interfaces.C.Streams` (:file:`i-cstrea.ads`) -============================================= +``Interfaces.C.Streams`` (:file:`i-cstrea.ads`) +=============================================== .. index:: Interfaces.C.Streams (i-cstrea.ads) @@ -1968,8 +2036,8 @@ on C streams. .. _`Interfaces.Packed_Decimal_(i-pacdec.ads)`: -`Interfaces.Packed_Decimal` (:file:`i-pacdec.ads`) -================================================== +``Interfaces.Packed_Decimal`` (:file:`i-pacdec.ads`) +==================================================== .. index:: Interfaces.Packed_Decimal (i-pacdec.ads) @@ -1983,8 +2051,8 @@ mainframes. .. _`Interfaces.VxWorks_(i-vxwork.ads)`: -`Interfaces.VxWorks` (:file:`i-vxwork.ads`) -=========================================== +``Interfaces.VxWorks`` (:file:`i-vxwork.ads`) +============================================= .. index:: Interfaces.VxWorks (i-vxwork.ads) @@ -1998,8 +2066,8 @@ VxWorks hardware interrupt facilities. .. _`Interfaces.VxWorks.Int_Connection_(i-vxinco.ads)`: -`Interfaces.VxWorks.Int_Connection` (:file:`i-vxinco.ads`) -========================================================== +``Interfaces.VxWorks.Int_Connection`` (:file:`i-vxinco.ads`) +============================================================ .. index:: Interfaces.VxWorks.Int_Connection (i-vxinco.ads) @@ -2013,8 +2081,8 @@ handlers. .. _`Interfaces.VxWorks.IO_(i-vxwoio.ads)`: -`Interfaces.VxWorks.IO` (:file:`i-vxwoio.ads`) -============================================== +``Interfaces.VxWorks.IO`` (:file:`i-vxwoio.ads`) +================================================ .. index:: Interfaces.VxWorks.IO (i-vxwoio.ads) @@ -2033,8 +2101,8 @@ to enable the use of Get_Immediate under VxWorks. .. _`System.Address_Image_(s-addima.ads)`: -`System.Address_Image` (:file:`s-addima.ads`) -============================================= +``System.Address_Image`` (:file:`s-addima.ads`) +=============================================== .. index:: System.Address_Image (s-addima.ads) @@ -2048,8 +2116,8 @@ string which identifies an address. .. _`System.Assertions_(s-assert.ads)`: -`System.Assertions` (:file:`s-assert.ads`) -========================================== +``System.Assertions`` (:file:`s-assert.ads`) +============================================ .. index:: System.Assertions (s-assert.ads) @@ -2063,8 +2131,8 @@ is used internally to raise this assertion. .. _`System.Atomic_Counters_(s-atocou.ads)`: -`System.Atomic_Counters` (:file:`s-atocou.ads`) -=============================================== +``System.Atomic_Counters`` (:file:`s-atocou.ads`) +================================================= .. index:: System.Atomic_Counters (s-atocou.ads) @@ -2077,8 +2145,8 @@ x86, and x86_64 platforms. .. _`System.Memory_(s-memory.ads)`: -`System.Memory` (:file:`s-memory.ads`) -====================================== +``System.Memory`` (:file:`s-memory.ads`) +======================================== .. index:: System.Memory (s-memory.ads) @@ -2091,12 +2159,12 @@ It also provides a reallocation interface analogous to the C routine realloc. The body of this unit may be modified to provide alternative allocation mechanisms for the default pool, and in addition, direct calls to this unit may be made for low level allocation uses (for -example see the body of `GNAT.Tables`). +example see the body of ``GNAT.Tables``). .. _`System.Multiprocessors_(s-multip.ads)`: -`System.Multiprocessors` (:file:`s-multip.ads`) -=============================================== +``System.Multiprocessors`` (:file:`s-multip.ads`) +================================================= .. index:: System.Multiprocessors (s-multip.ads) @@ -2108,8 +2176,8 @@ technically an implementation-defined addition). .. _`System.Multiprocessors.Dispatching_Domains_(s-mudido.ads)`: -`System.Multiprocessors.Dispatching_Domains` (:file:`s-mudido.ads`) -=================================================================== +``System.Multiprocessors.Dispatching_Domains`` (:file:`s-mudido.ads`) +===================================================================== .. index:: System.Multiprocessors.Dispatching_Domains (s-mudido.ads) @@ -2121,8 +2189,8 @@ technically an implementation-defined addition). .. _`System.Partition_Interface_(s-parint.ads)`: -`System.Partition_Interface` (:file:`s-parint.ads`) -=================================================== +``System.Partition_Interface`` (:file:`s-parint.ads`) +===================================================== .. index:: System.Partition_Interface (s-parint.ads) @@ -2130,12 +2198,12 @@ technically an implementation-defined addition). This package provides facilities for partition interfacing. It is used primarily in a distribution context when using Annex E -with `GLADE`. +with ``GLADE``. .. _`System.Pool_Global_(s-pooglo.ads)`: -`System.Pool_Global` (:file:`s-pooglo.ads`) -=========================================== +``System.Pool_Global`` (:file:`s-pooglo.ads`) +============================================= .. index:: System.Pool_Global (s-pooglo.ads) @@ -2150,8 +2218,8 @@ do any automatic reclamation. .. _`System.Pool_Local_(s-pooloc.ads)`: -`System.Pool_Local` (:file:`s-pooloc.ads`) -========================================== +``System.Pool_Local`` (:file:`s-pooloc.ads`) +============================================ .. index:: System.Pool_Local (s-pooloc.ads) @@ -2166,8 +2234,8 @@ be freed automatically when the pool is finalized. .. _`System.Restrictions_(s-restri.ads)`: -`System.Restrictions` (:file:`s-restri.ads`) -============================================ +``System.Restrictions`` (:file:`s-restri.ads`) +============================================== .. index:: System.Restrictions (s-restri.ads) @@ -2182,8 +2250,8 @@ are violated by one or more packages in the partition. .. _`System.Rident_(s-rident.ads)`: -`System.Rident` (:file:`s-rident.ads`) -====================================== +``System.Rident`` (:file:`s-rident.ads`) +======================================== .. index:: System.Rident (s-rident.ads) @@ -2192,14 +2260,14 @@ are violated by one or more packages in the partition. This package provides definitions of the restrictions identifiers supported by GNAT, and also the format of the restrictions provided in package System.Restrictions. -It is not normally necessary to `with` this generic package +It is not normally necessary to ``with`` this generic package since the necessary instantiation is included in package System.Restrictions. .. _`System.Strings.Stream_Ops_(s-ststop.ads)`: -`System.Strings.Stream_Ops` (:file:`s-ststop.ads`) -================================================== +``System.Strings.Stream_Ops`` (:file:`s-ststop.ads`) +==================================================== .. index:: System.Strings.Stream_Ops (s-ststop.ads) @@ -2214,8 +2282,8 @@ package can be used directly by application programs. .. _`System.Unsigned_Types_(s-unstyp.ads)`: -`System.Unsigned_Types` (:file:`s-unstyp.ads`) -============================================== +``System.Unsigned_Types`` (:file:`s-unstyp.ads`) +================================================ .. index:: System.Unsigned_Types (s-unstyp.ads) @@ -2227,8 +2295,8 @@ used by the compiler in connection with packed array types. .. _`System.Wch_Cnv_(s-wchcnv.ads)`: -`System.Wch_Cnv` (:file:`s-wchcnv.ads`) -======================================= +``System.Wch_Cnv`` (:file:`s-wchcnv.ads`) +========================================= .. index:: System.Wch_Cnv (s-wchcnv.ads) @@ -2240,18 +2308,18 @@ used by the compiler in connection with packed array types. This package provides routines for converting between wide and wide wide characters and a representation as a value of type -`Standard.String`, using a specified wide character +``Standard.String``, using a specified wide character encoding method. It uses definitions in -package `System.Wch_Con`. +package ``System.Wch_Con``. .. _`System.Wch_Con_(s-wchcon.ads)`: -`System.Wch_Con` (:file:`s-wchcon.ads`) -======================================= +``System.Wch_Con`` (:file:`s-wchcon.ads`) +========================================= .. index:: System.Wch_Con (s-wchcon.ads) This package provides definitions and descriptions of the various methods used for encoding wide characters in ordinary strings. These definitions are used by -the package `System.Wch_Cnv`. +the package ``System.Wch_Cnv``. diff --git a/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst b/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst index e04fb9a..653ace6 100644 --- a/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst +++ b/gcc/ada/doc/gnat_rm/the_implementation_of_standard_i_o.rst @@ -68,9 +68,9 @@ are implemented using the C library streams facility; where * - All files are opened using `fopen`. + All files are opened using ``fopen``. * - All input/output operations use `fread`/`fwrite`. + All input/output operations use ``fread``/`fwrite`. There is no internal buffering of any kind at the Ada library level. The only buffering is that provided at the system level in the implementation of the @@ -127,8 +127,8 @@ The records of a Direct_IO file are simply written to the file in index sequence, with the first record starting at offset zero, and subsequent records following. There is no control information of any kind. For example, if 32-bit integers are being written, each record takes -4-bytes, so the record at index `K` starts at offset -(`K`-1)*4. +4-bytes, so the record at index ``K`` starts at offset +(``K``-1)*4. There is no limit on the size of Direct_IO files, they are expanded as necessary to accommodate whatever records are written to the file. @@ -148,17 +148,17 @@ checking is performed on input. For the indefinite type case, the elements written consist of two parts. First is the size of the data item, written as the memory image -of a `Interfaces.C.size_t` value, followed by the memory image of +of a ``Interfaces.C.size_t`` value, followed by the memory image of the data value. The resulting file can only be read using the same (unconstrained) type. Normal assignment checks are performed on these -read operations, and if these checks fail, `Data_Error` is +read operations, and if these checks fail, ``Data_Error`` is raised. In particular, in the array case, the lengths must match, and in the variant record case, if the variable for a particular read operation is constrained, the discriminants must match. Note that it is not possible to use Sequential_IO to write variable length array items, and then read the data back into different length -arrays. For example, the following will raise `Data_Error`: +arrays. For example, the following will raise ``Data_Error``: .. code-block:: ada @@ -175,9 +175,9 @@ arrays. For example, the following will raise `Data_Error`: -On some Ada implementations, this will print `hell`, but the program is +On some Ada implementations, this will print ``hell``, but the program is clearly incorrect, since there is only one element in the file, and that -element is the string `hello!`. +element is the string ``hello!``. In Ada 95 and Ada 2005, this kind of behavior can be legitimately achieved using Stream_IO, and this is the preferred mechanism. In particular, the @@ -202,23 +202,23 @@ A canonical Text_IO file is defined as one in which the following conditions are met: * - The character `LF` is used only as a line mark, i.e., to mark the end + The character ``LF`` is used only as a line mark, i.e., to mark the end of the line. * - The character `FF` is used only as a page mark, i.e., to mark the + The character ``FF`` is used only as a page mark, i.e., to mark the end of a page and consequently can appear only immediately following a - `LF` (line mark) character. + ``LF`` (line mark) character. * - The file ends with either `LF` (line mark) or `LF`-`FF` + The file ends with either ``LF`` (line mark) or ``LF``-`FF` (line mark, page mark). In the former case, the page mark is implicitly assumed to be present. A file written using Text_IO will be in canonical form provided that no -explicit `LF` or `FF` characters are written using `Put` -or `Put_Line`. There will be no `FF` character at the end of -the file unless an explicit `New_Page` operation was performed +explicit ``LF`` or ``FF`` characters are written using ``Put`` +or ``Put_Line``. There will be no ``FF`` character at the end of +the file unless an explicit ``New_Page`` operation was performed before closing the file. A canonical Text_IO file that is a regular file (i.e., not a device or a @@ -230,24 +230,24 @@ A text file that does not meet the requirements for a canonical Text_IO file has one of the following: * - The file contains `FF` characters not immediately following a - `LF` character. + The file contains ``FF`` characters not immediately following a + ``LF`` character. * - The file contains `LF` or `FF` characters written by - `Put` or `Put_Line`, which are not logically considered to be + The file contains ``LF`` or ``FF`` characters written by + ``Put`` or ``Put_Line``, which are not logically considered to be line marks or page marks. * - The file ends in a character other than `LF` or `FF`, + The file ends in a character other than ``LF`` or ``FF``, i.e., there is no explicit line mark or page mark at the end of the file. Text_IO can be used to read such non-standard text files but subprograms to do with line or page numbers do not have defined meanings. In -particular, a `FF` character that does not follow a `LF` +particular, a ``FF`` character that does not follow a ``LF`` character may or may not be treated as a page mark from the point of -view of page and line numbering. Every `LF` character is considered -to end a line, and there is an implied `LF` character at the end of +view of page and line numbering. Every ``LF`` character is considered +to end a line, and there is an implied ``LF`` character at the end of the file. .. _Stream_Pointer_Positioning: @@ -255,20 +255,20 @@ the file. Stream Pointer Positioning -------------------------- -`Ada.Text_IO` has a definition of current position for a file that +``Ada.Text_IO`` has a definition of current position for a file that is being read. No internal buffering occurs in Text_IO, and usually the physical position in the stream used to implement the file corresponds to this logical position defined by Text_IO. There are two exceptions: * - After a call to `End_Of_Page` that returns `True`, the stream - is positioned past the `LF` (line mark) that precedes the page + After a call to ``End_Of_Page`` that returns ``True``, the stream + is positioned past the ``LF`` (line mark) that precedes the page mark. Text_IO maintains an internal flag so that subsequent read operations properly handle the logical position which is unchanged by - the `End_Of_Page` call. + the ``End_Of_Page`` call. * - After a call to `End_Of_File` that returns `True`, if the + After a call to ``End_Of_File`` that returns ``True``, if the Text_IO file was positioned before the line mark at the end of file before the call, then the logical position is unchanged, but the stream is physically positioned right at the end of file (past the line mark, @@ -294,12 +294,12 @@ for reading, the behavior of Text_IO is modified to avoid undesirable look-ahead as follows: An input file that is not a regular file is considered to have no page -marks. Any `Ascii.FF` characters (the character normally used for a +marks. Any ``Ascii.FF`` characters (the character normally used for a page mark) appearing in the file are considered to be data characters. In particular: * - `Get_Line` and `Skip_Line` do not test for a page mark + ``Get_Line`` and ``Skip_Line`` do not test for a page mark following a line mark. If a page mark appears, it will be treated as a data character. @@ -308,14 +308,14 @@ characters. In particular: entered from the pipe to complete one of these operations. * - `End_Of_Page` always returns `False` + ``End_Of_Page`` always returns ``False`` * - `End_Of_File` will return `False` if there is a page mark at + ``End_Of_File`` will return ``False`` if there is a page mark at the end of the file. Output to non-regular files is the same as for regular files. Page marks -may be written to non-regular files using `New_Page`, but as noted +may be written to non-regular files using ``New_Page``, but as noted above they will not be treated as page marks on input if the output is piped to another Ada program. @@ -323,9 +323,9 @@ Another important discrepancy when reading non-regular files is that the end of file indication is not 'sticky'. If an end of file is entered, e.g., by pressing the :kbd:`EOT` key, then end of file -is signaled once (i.e., the test `End_Of_File` -will yield `True`, or a read will -raise `End_Error`), but then reading can resume +is signaled once (i.e., the test ``End_Of_File`` +will yield ``True``, or a read will +raise ``End_Error``), but then reading can resume to read data past that end of file indication, until another end of file indication is entered. @@ -354,14 +354,14 @@ Treating Text_IO Files as Streams .. index:: Stream files -The package `Text_IO.Streams` allows a Text_IO file to be treated -as a stream. Data written to a Text_IO file in this stream mode is -binary data. If this binary data contains bytes 16#0A# (`LF`) or -16#0C# (`FF`), the resulting file may have non-standard +The package ``Text_IO.Streams`` allows a ``Text_IO`` file to be treated +as a stream. Data written to a ``Text_IO`` file in this stream mode is +binary data. If this binary data contains bytes 16#0A# (``LF``) or +16#0C# (``FF``), the resulting file may have non-standard format. Similarly if read operations are used to read from a Text_IO -file treated as a stream, then `LF` and `FF` characters may be +file treated as a stream, then ``LF`` and ``FF`` characters may be skipped and the effect is similar to that described above for -`Get_Immediate`. +``Get_Immediate``. .. _Text_IO_Extensions: @@ -371,7 +371,7 @@ Text_IO Extensions .. index:: Text_IO extensions A package GNAT.IO_Aux in the GNAT library provides some useful extensions -to the standard `Text_IO` package: +to the standard ``Text_IO`` package: * function File_Exists (Name : String) return Boolean; Determines if a file of the given name exists. @@ -394,8 +394,8 @@ Text_IO Facilities for Unbounded Strings .. index:: Unbounded_String, Text_IO operations -The package `Ada.Strings.Unbounded.Text_IO` -in library files `a-suteio.ads/adb` contains some GNAT-specific +The package ``Ada.Strings.Unbounded.Text_IO`` +in library files :file:`a-suteio.ads/adb` contains some GNAT-specific subprograms useful for Text_IO operations on unbounded strings: @@ -406,32 +406,32 @@ subprograms useful for Text_IO operations on unbounded strings: * procedure Put (File : File_Type; U : Unbounded_String); Writes the value of the given unbounded string to the specified file Similar to the effect of - `Put (To_String (U))` except that an extra copy is avoided. + ``Put (To_String (U))`` except that an extra copy is avoided. * procedure Put_Line (File : File_Type; U : Unbounded_String); Writes the value of the given unbounded string to the specified file, - followed by a `New_Line`. - Similar to the effect of `Put_Line (To_String (U))` except + followed by a ``New_Line``. + Similar to the effect of ``Put_Line (To_String (U))`` except that an extra copy is avoided. -In the above procedures, `File` is of type `Ada.Text_IO.File_Type` +In the above procedures, ``File`` is of type ``Ada.Text_IO.File_Type`` and is optional. If the parameter is omitted, then the standard input or output file is referenced as appropriate. -The package `Ada.Strings.Wide_Unbounded.Wide_Text_IO` in library +The package ``Ada.Strings.Wide_Unbounded.Wide_Text_IO`` in library files :file:`a-swuwti.ads` and :file:`a-swuwti.adb` provides similar extended -`Wide_Text_IO` functionality for unbounded wide strings. +``Wide_Text_IO`` functionality for unbounded wide strings. -The package `Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO` in library +The package ``Ada.Strings.Wide_Wide_Unbounded.Wide_Wide_Text_IO`` in library files :file:`a-szuzti.ads` and :file:`a-szuzti.adb` provides similar extended -`Wide_Wide_Text_IO` functionality for unbounded wide wide strings. +``Wide_Wide_Text_IO`` functionality for unbounded wide wide strings. .. _Wide_Text_IO: Wide_Text_IO ============ -`Wide_Text_IO` is similar in most respects to Text_IO, except that +``Wide_Text_IO`` is similar in most respects to Text_IO, except that both input and output files may contain special sequences that represent wide character values. The encoding scheme for a given file may be specified using a FORM parameter: @@ -443,7 +443,7 @@ specified using a FORM parameter: as part of the FORM string (WCEM = wide character encoding method), -where `x` is one of the following characters +where ``x`` is one of the following characters ========== ==================== Character Encoding @@ -480,11 +480,11 @@ being brackets encoding if no coding method was specified with -gnatW). .. - where `a`, `b`, `c`, `d` are the four hexadecimal + where ``a``, ``b``, ``c``, ``d`` are the four hexadecimal characters (using upper case letters) of the wide character code. For example, ESC A345 is used to represent the wide character with code 16#A345#. This scheme is compatible with use of the full - `Wide_Character` set. + ``Wide_Character`` set. *Upper Half Coding* @@ -527,7 +527,7 @@ being brackets encoding if no coding method was specified with -gnatW). .. - where the `xxx` bits correspond to the left-padded bits of the + where the ``xxx`` bits correspond to the left-padded bits of the 16-bit character value. Note that all lower half ASCII characters are represented as ASCII bytes and all upper half characters and other wide characters are represented as sequences of upper-half @@ -548,14 +548,14 @@ being brackets encoding if no coding method was specified with -gnatW). .. - where `a`, `b`, `c`, `d` are the four hexadecimal + where ``a``, ``b``, ``c``, ``d`` are the four hexadecimal characters (using uppercase letters) of the wide character code. For - example, `["A345"]` is used to represent the wide character with code - `16#A345#`. + example, ``["A345"]`` is used to represent the wide character with code + ``16#A345#``. This scheme is compatible with use of the full Wide_Character set. On input, brackets coding can also be used for upper half characters, - e.g., `["C1"]` for lower case a. However, on output, brackets notation - is only used for wide characters with a code greater than `16#FF#`. + e.g., ``["C1"]`` for lower case a. However, on output, brackets notation + is only used for wide characters with a code greater than ``16#FF#``. Note that brackets coding is not normally used in the context of Wide_Text_IO or Wide_Wide_Text_IO, since it is really just designed as @@ -612,11 +612,11 @@ input also causes Constraint_Error to be raised. Stream Pointer Positioning -------------------------- -`Ada.Wide_Text_IO` is similar to `Ada.Text_IO` in its handling +``Ada.Wide_Text_IO`` is similar to ``Ada.Text_IO`` in its handling of stream pointer positioning (:ref:`Text_IO`). There is one additional case: -If `Ada.Wide_Text_IO.Look_Ahead` reads a character outside the +If ``Ada.Wide_Text_IO.Look_Ahead`` reads a character outside the normal lower ASCII set (i.e., a character in the range: @@ -626,11 +626,11 @@ normal lower ASCII set (i.e., a character in the range: then although the logical position of the file pointer is unchanged by -the `Look_Ahead` call, the stream is physically positioned past the +the ``Look_Ahead`` call, the stream is physically positioned past the wide character sequence. Again this is to avoid the need for buffering -or backup, and all `Wide_Text_IO` routines check the internal +or backup, and all ``Wide_Text_IO`` routines check the internal indication that this situation has occurred so that this is not visible -to a normal program using `Wide_Text_IO`. However, this discrepancy +to a normal program using ``Wide_Text_IO``. However, this discrepancy can be observed if the wide text file shares a stream with another file. .. _Reading_and_Writing_Non-Regular_Files_1: @@ -640,8 +640,8 @@ Reading and Writing Non-Regular Files As in the case of Text_IO, when a non-regular file is read, it is assumed that the file contains no page marks (any form characters are -treated as data characters), and `End_Of_Page` always returns -`False`. Similarly, the end of file indication is not sticky, so +treated as data characters), and ``End_Of_Page`` always returns +``False``. Similarly, the end of file indication is not sticky, so it is possible to read beyond an end of file. .. _Wide_Wide_Text_IO: @@ -649,7 +649,7 @@ it is possible to read beyond an end of file. Wide_Wide_Text_IO ================= -`Wide_Wide_Text_IO` is similar in most respects to Text_IO, except that +``Wide_Wide_Text_IO`` is similar in most respects to Text_IO, except that both input and output files may contain special sequences that represent wide wide character values. The encoding scheme for a given file may be specified using a FORM parameter: @@ -661,7 +661,7 @@ specified using a FORM parameter: as part of the FORM string (WCEM = wide character encoding method), -where `x` is one of the following characters +where ``x`` is one of the following characters ========== ==================== Character Encoding @@ -704,7 +704,7 @@ being brackets encoding if no coding method was specified with -gnatW). .. - where the `xxx` bits correspond to the left-padded bits of the + where the ``xxx`` bits correspond to the left-padded bits of the 21-bit character value. Note that all lower half ASCII characters are represented as ASCII bytes and all upper half characters and other wide characters are represented as sequences of upper-half @@ -731,16 +731,16 @@ being brackets encoding if no coding method was specified with -gnatW). .. - where `a`, `b`, `c`, `d`, `e`, and `f` + where ``a``, ``b``, ``c``, ``d``, ``e``, and ``f`` are the four or six hexadecimal characters (using uppercase letters) of the wide wide character code. For - example, `["01A345"]` is used to represent the wide wide character - with code `16#01A345#`. + example, ``["01A345"]`` is used to represent the wide wide character + with code ``16#01A345#``. This scheme is compatible with use of the full Wide_Wide_Character set. On input, brackets coding can also be used for upper half characters, - e.g., `["C1"]` for lower case a. However, on output, brackets notation - is only used for wide characters with a code greater than `16#FF#`. + e.g., ``["C1"]`` for lower case a. However, on output, brackets notation + is only used for wide characters with a code greater than ``16#FF#``. If is also possible to use the other Wide_Character encoding methods, @@ -756,11 +756,11 @@ input also causes Constraint_Error to be raised. Stream Pointer Positioning -------------------------- -`Ada.Wide_Wide_Text_IO` is similar to `Ada.Text_IO` in its handling +``Ada.Wide_Wide_Text_IO`` is similar to ``Ada.Text_IO`` in its handling of stream pointer positioning (:ref:`Text_IO`). There is one additional case: -If `Ada.Wide_Wide_Text_IO.Look_Ahead` reads a character outside the +If ``Ada.Wide_Wide_Text_IO.Look_Ahead`` reads a character outside the normal lower ASCII set (i.e., a character in the range: @@ -770,11 +770,11 @@ normal lower ASCII set (i.e., a character in the range: then although the logical position of the file pointer is unchanged by -the `Look_Ahead` call, the stream is physically positioned past the +the ``Look_Ahead`` call, the stream is physically positioned past the wide character sequence. Again this is to avoid the need for buffering -or backup, and all `Wide_Wide_Text_IO` routines check the internal +or backup, and all ``Wide_Wide_Text_IO`` routines check the internal indication that this situation has occurred so that this is not visible -to a normal program using `Wide_Wide_Text_IO`. However, this discrepancy +to a normal program using ``Wide_Wide_Text_IO``. However, this discrepancy can be observed if the wide text file shares a stream with another file. .. _Reading_and_Writing_Non-Regular_Files_2: @@ -784,8 +784,8 @@ Reading and Writing Non-Regular Files As in the case of Text_IO, when a non-regular file is read, it is assumed that the file contains no page marks (any form characters are -treated as data characters), and `End_Of_Page` always returns -`False`. Similarly, the end of file indication is not sticky, so +treated as data characters), and ``End_Of_Page`` always returns +``False``. Similarly, the end of file indication is not sticky, so it is possible to read beyond an end of file. .. _Stream_IO: @@ -795,11 +795,11 @@ Stream_IO A stream file is a sequence of bytes, where individual elements are written to the file as described in the Ada Reference Manual. The type -`Stream_Element` is simply a byte. There are two ways to read or +``Stream_Element`` is simply a byte. There are two ways to read or write a stream file. * - The operations `Read` and `Write` directly read or write a + The operations ``Read`` and ``Write`` directly read or write a sequence of stream elements with no control information. * @@ -854,7 +854,7 @@ dependence, GNAT handles file sharing as follows: * In the absence of a ``shared=xxx`` form parameter, an attempt to open two or more files with the same full name is considered an error - and is not supported. The exception `Use_Error` will be + and is not supported. The exception ``Use_Error`` will be raised. Note that a file that is not explicitly closed by the program remains open until the program terminates. @@ -873,12 +873,12 @@ dependence, GNAT handles file sharing as follows: When a program that opens multiple files with the same name is ported from another Ada compiler to GNAT, the effect will be that -`Use_Error` is raised. +``Use_Error`` is raised. The documentation of the original compiler and the documentation of the program should then be examined to determine if file sharing was -expected, and ``shared=xxx`` parameters added to `Open` -and `Create` calls as required. +expected, and ``shared=xxx`` parameters added to ``Open`` +and ``Create`` calls as required. When a program is ported from GNAT to some other Ada compiler, no special attention is required unless the ``shared=xxx`` form @@ -961,11 +961,11 @@ This encoding is only supported on the Windows platform. Open Modes ========== -`Open` and `Create` calls result in a call to `fopen` +``Open`` and ``Create`` calls result in a call to ``fopen`` using the mode shown in the following table: +----------------------------+---------------+------------------+ -| `Open` and `Create` Call Modes | +| ``Open`` and ``Create`` Call Modes | +----------------------------+---------------+------------------+ | | **OPEN** | **CREATE** | +============================+===============+==================+ @@ -989,7 +989,7 @@ DOS-like systems, and is not relevant to other systems. A special case occurs with Stream_IO. As shown in the above table, the file is initially opened in ``r`` or ``w`` mode for the -`In_File` and `Out_File` cases. If a `Set_Mode` operation +``In_File`` and ``Out_File`` cases. If a ``Set_Mode`` operation subsequently requires switching from reading to writing or vice-versa, then the file is reopened in ``r+`` mode to permit the required operation. @@ -998,7 +998,7 @@ then the file is reopened in ``r+`` mode to permit the required operation. Operations on C Streams ======================= -The package `Interfaces.C_Streams` provides an Ada program with direct +The package ``Interfaces.C_Streams`` provides an Ada program with direct access to the C library functions for operations on C streams: @@ -1233,19 +1233,19 @@ operations. end Ada.Stream_IO.C_Streams; -In each of these six packages, the `C_Stream` function obtains the -`FILE` pointer from a currently opened Ada file. It is then -possible to use the `Interfaces.C_Streams` package to operate on +In each of these six packages, the ``C_Stream`` function obtains the +``FILE`` pointer from a currently opened Ada file. It is then +possible to use the ``Interfaces.C_Streams`` package to operate on this stream, or the stream can be passed to a C program which can operate on it directly. Of course the program is responsible for ensuring that only appropriate sequences of operations are executed. One particular use of relevance to an Ada program is that the -`setvbuf` function can be used to control the buffering of the +``setvbuf`` function can be used to control the buffering of the stream used by an Ada file. In the absence of such a call the standard default buffering is used. -The `Open` procedures in these packages open a file giving an +The ``Open`` procedures in these packages open a file giving an existing C Stream instead of a file name. Typically this stream is imported from a C program, allowing an Ada file to operate on an existing C file. |