Commit 08705a15 by Arnaud Charlet Committed by Arnaud Charlet

gnat_rm.texi, [...]: Update documentation.

       * gnat_rm.texi, gnat_ugn.texi,
        doc/gnat_ugn/the_gnat_compilation_model.rst,
        doc/gnat_ugn/getting_started_with_gnat.rst,
        doc/gnat_ugn/inline_assembler.rst,
        doc/gnat_ugn/building_executable_programs_with_gnat.rst,
        doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
        doc/gnat_ugn/about_this_guide.rst,
        doc/gnat_ugn/platform_specific_information.rst,
        doc/gnat_ugn/example_of_binder_output.rst,
        doc/gnat_ugn/gnat_and_program_execution.rst,
        doc/gnat_ugn/gnat_utility_programs.rst,
        doc/gnat_rm/implementation_of_specific_ada_features.rst,
        doc/gnat_rm/interfacing_to_other_languages.rst,
        doc/gnat_rm/implementation_defined_aspects.rst,
        doc/gnat_rm/intrinsic_subprograms.rst,
        doc/gnat_rm/implementation_defined_characteristics.rst,
        doc/gnat_rm/implementation_advice.rst,
        doc/gnat_rm/implementation_defined_attributes.rst,
        doc/gnat_rm/compatibility_and_porting_guide.rst,
        doc/gnat_rm/standard_library_routines.rst,
        doc/gnat_rm/the_gnat_library.rst,
        doc/gnat_rm/implementation_defined_pragmas.rst,
        doc/gnat_rm/representation_clauses_and_pragmas.rst,
        doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
        doc/gnat_rm/obsolescent_features.rst,
        doc/gnat_rm/about_this_guide.rst,
        doc/gnat_rm/the_implementation_of_standard_i_o.rst,
        doc/gnat_rm/implementation_of_ada_2012_features.rst,
        doc/gnat_ugn.rst,
        doc/gnat_rm.rst: Update documentation.

From-SVN: r251889
parent 9651fbaf
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* gnat_rm.texi, gnat_ugn.texi,
doc/gnat_ugn/the_gnat_compilation_model.rst,
doc/gnat_ugn/getting_started_with_gnat.rst,
doc/gnat_ugn/inline_assembler.rst,
doc/gnat_ugn/building_executable_programs_with_gnat.rst,
doc/gnat_ugn/elaboration_order_handling_in_gnat.rst,
doc/gnat_ugn/about_this_guide.rst,
doc/gnat_ugn/platform_specific_information.rst,
doc/gnat_ugn/example_of_binder_output.rst,
doc/gnat_ugn/gnat_and_program_execution.rst,
doc/gnat_ugn/gnat_utility_programs.rst,
doc/gnat_rm/implementation_of_specific_ada_features.rst,
doc/gnat_rm/interfacing_to_other_languages.rst,
doc/gnat_rm/implementation_defined_aspects.rst,
doc/gnat_rm/intrinsic_subprograms.rst,
doc/gnat_rm/implementation_defined_characteristics.rst,
doc/gnat_rm/implementation_advice.rst,
doc/gnat_rm/implementation_defined_attributes.rst,
doc/gnat_rm/compatibility_and_porting_guide.rst,
doc/gnat_rm/standard_library_routines.rst,
doc/gnat_rm/the_gnat_library.rst,
doc/gnat_rm/implementation_defined_pragmas.rst,
doc/gnat_rm/representation_clauses_and_pragmas.rst,
doc/gnat_rm/standard_and_implementation_defined_restrictions.rst,
doc/gnat_rm/obsolescent_features.rst,
doc/gnat_rm/about_this_guide.rst,
doc/gnat_rm/the_implementation_of_standard_i_o.rst,
doc/gnat_rm/implementation_of_ada_2012_features.rst,
doc/gnat_ugn.rst,
doc/gnat_rm.rst: Update documentation.
2017-09-08 Arnaud Charlet <charlet@adacore.com>
* s-dwalin.ads, s-dwalin.adb, s-trasym-dwarf.adb, s-objrea.ads,
s-objrea.adb, s-tsmona-linux.adb, s-tsmona-mingw.adb: New.
* gcc-interface/Makefile.in: Enable s-trasym-dwarf.adb on x86*linux.
2017-09-08 Bob Duff <duff@adacore.com> 2017-09-08 Bob Duff <duff@adacore.com>
* s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag): * s-ststop.ads, s-ststop.adb, rtsfind.ads (String_Input_Tag):
......
GNAT Reference Manual GNAT Reference Manual
===================== =====================
*GNAT, The GNU Ada Development Environment* .. only:: not latex
.. only:: PRO *GNAT, The GNU Ada Development Environment*
*GNAT Pro Edition* .. only:: PRO
| Version |version| *GNAT Pro Edition*
| Date: |today|
.. only:: GPL | Version |version|
| Date: |today|
*GNAT GPL Edition* .. only:: GPL
| Version |version| *GNAT GPL Edition*
| Date: |today|
.. only:: FSF | Version |version|
| Date: |today|
.. raw:: texinfo .. only:: FSF
@include gcc-common.texi .. raw:: texinfo
GCC version @value{version-GCC}@*
AdaCore @include gcc-common.texi
GCC version @value{version-GCC}@*
Permission is granted to copy, distribute and/or modify this document AdaCore
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no Permission is granted to copy, distribute and/or modify this document
Invariant Sections, with the Front-Cover Texts being "GNAT Reference under the terms of the GNU Free Documentation License, Version 1.3 or
Manual", and with no Back-Cover Texts. A copy of the license is any later version published by the Free Software Foundation; with no
included in the section entitled :ref:`gnu_fdl`. Invariant Sections, with the Front-Cover Texts being "GNAT Reference
Manual", and with no Back-Cover Texts. A copy of the license is
included in the section entitled :ref:`gnu_fdl`.
.. toctree:: .. toctree::
:numbered: :numbered:
......
...@@ -130,14 +130,14 @@ Conventions ...@@ -130,14 +130,14 @@ Conventions
Following are examples of the typographical and graphic conventions used Following are examples of the typographical and graphic conventions used
in this guide: in this guide:
* `Functions`, `utility program names`, `standard names`, * ``Functions``, ``utility program names``, ``standard names``,
and `classes`. and ``classes``.
* `Option flags` * ``Option flags``
* :file:`File names` * :file:`File names`
* `Variables` * ``Variables``
* *Emphasis* * *Emphasis*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -16,13 +16,13 @@ Interfacing to C ...@@ -16,13 +16,13 @@ Interfacing to C
Interfacing to C with GNAT can use one of two approaches: 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 Standard Ada types may be used directly. This may be less portable to
other compilers, but will work on all GNAT compilers, which guarantee other compilers, but will work on all GNAT compilers, which guarantee
correspondence between the C and Ada types. 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 effect, since this is the default. The following table shows the
correspondence between Ada scalar types and the corresponding C types. correspondence between Ada scalar types and the corresponding C types.
...@@ -46,11 +46,11 @@ and C types: ...@@ -46,11 +46,11 @@ and C types:
* *
Ada enumeration types map to C enumeration types directly if pragma Ada enumeration types map to C enumeration types directly if pragma
`Convention C` is specified, which causes them to have int ``Convention C`` is specified, which causes them to have int
length. Without pragma `Convention C`, Ada enumeration types map to length. Without pragma ``Convention C``, Ada enumeration types map to
8, 16, or 32 bits (i.e., C types `signed char`, `short`, 8, 16, or 32 bits (i.e., C types ``signed char``, ``short``,
`int`, respectively) depending on the number of values passed. ``int``, respectively) depending on the number of values passed.
This is the only case in which pragma `Convention C` affects the This is the only case in which pragma ``Convention C`` affects the
representation of an Ada type. representation of an Ada type.
* *
...@@ -80,29 +80,29 @@ Using these pragmas it is possible to achieve complete ...@@ -80,29 +80,29 @@ Using these pragmas it is possible to achieve complete
inter-operability between Ada tagged types and C++ class definitions. inter-operability between Ada tagged types and C++ class definitions.
See :ref:`Implementation_Defined_Pragmas`, for more details. 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 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 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 corresponds to an externally declared C++ class type, and is to be laid
out the same way that C++ would lay out the type. 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 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 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 A few restrictions are placed on the use of the ``Access`` attribute
in conjunction with subprograms subject to convention `CPP`: the in conjunction with subprograms subject to convention ``CPP``: the
attribute may be used neither on primitive operations of a tagged attribute may be used neither on primitive operations of a tagged
record type with convention `CPP`, imported or not, nor on record type with convention ``CPP``, imported or not, nor on
subprograms imported with pragma `CPP_Constructor`. subprograms imported with pragma ``CPP_Constructor``.
In addition, C++ exceptions are propagated and can be handled in an 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 occurrence has no message, and the simple name of the exception identity
contains ``Foreign_Exception``. Finalization and awaiting dependent contains ``Foreign_Exception``. Finalization and awaiting dependent
tasks works properly when such foreign exceptions are propagated. 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: ...@@ -118,7 +118,7 @@ It is also possible to import a C++ exception using the following syntax:
[External_Name =>] static_string_EXPRESSION); [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. cover a specific C++ exception in an exception handler.
.. _Interfacing_to_COBOL: .. _Interfacing_to_COBOL:
...@@ -135,7 +135,7 @@ Interfacing to Fortran ...@@ -135,7 +135,7 @@ Interfacing to Fortran
====================== ======================
Interfacing to Fortran is achieved as described in section B.5 of the 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 multi-dimensional array causes the array to be stored in column-major
order as required for convenient interface to Fortran. order as required for convenient interface to Fortran.
...@@ -144,8 +144,8 @@ 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 Interfacing to non-GNAT Ada code
================================ ================================
It is possible to specify the convention `Ada` in a pragma It is possible to specify the convention ``Ada`` in a pragma
`Import` or pragma `Export`. However this refers to ``Import`` or pragma ``Export``. However this refers to
the calling conventions used by GNAT, which may or may not be 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 similar enough to those used by some other Ada 83 / Ada 95 / Ada 2005
compiler to allow interoperation. compiler to allow interoperation.
......
...@@ -31,13 +31,13 @@ Intrinsic Operators ...@@ -31,13 +31,13 @@ Intrinsic Operators
.. index:: Intrinsic operator .. index:: Intrinsic operator
All the predefined numeric operators in package Standard 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 declarations. In the binary operator case, the operands must have the same
size. The operand or operands must also be appropriate for size. The operand or operands must also be appropriate for
the operator. For example, for addition, the operands must the operator. For example, for addition, the operands must
both be floating-point or both be fixed-point, and the both be floating-point or both be fixed-point, and the
right operand for `"**"` must have a root type of right operand for ``"**"`` must have a root type of
`Standard.Integer'Base`. ``Standard.Integer'Base``.
You can use an intrinsic operator declaration as in the following example: 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: ...@@ -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 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 It is also possible to specify such operators for private types, if the
full views are appropriate arithmetic types. full views are appropriate arithmetic types.
...@@ -64,11 +64,11 @@ Compilation_Date ...@@ -64,11 +64,11 @@ Compilation_Date
.. index:: Compilation_Date .. index:: Compilation_Date
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function application program should simply call the function
`GNAT.Source_Info.Compilation_Date` to obtain the date of ``GNAT.Source_Info.Compilation_ISO_Date`` to obtain the date of
the current compilation (in local time format MMM DD YYYY). the current compilation (in local time format YYYY-MM-DD).
.. _Compilation_Time: .. _Compilation_Time:
...@@ -78,10 +78,10 @@ Compilation_Time ...@@ -78,10 +78,10 @@ Compilation_Time
.. index:: Compilation_Time .. index:: Compilation_Time
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function 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). the current compilation (in local time format HH:MM:SS).
.. _Enclosing_Entity: .. _Enclosing_Entity:
...@@ -92,10 +92,10 @@ Enclosing_Entity ...@@ -92,10 +92,10 @@ Enclosing_Entity
.. index:: Enclosing_Entity .. index:: Enclosing_Entity
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function 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. the current subprogram, package, task, entry, or protected subprogram.
.. _Exception_Information: .. _Exception_Information:
...@@ -106,10 +106,10 @@ Exception_Information ...@@ -106,10 +106,10 @@ Exception_Information
.. index:: Exception_Information' .. index:: Exception_Information'
This intrinsic subprogram is used in the implementation of the 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, use of the intrinsic import in this case is the one in this unit,
so an application program should simply call the function 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. the exception information associated with the current exception.
.. _Exception_Message: .. _Exception_Message:
...@@ -120,10 +120,10 @@ Exception_Message ...@@ -120,10 +120,10 @@ Exception_Message
.. index:: Exception_Message .. index:: Exception_Message
This intrinsic subprogram is used in the implementation of the 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, use of the intrinsic import in this case is the one in this unit,
so an application program should simply call the function 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. the message associated with the current exception.
.. _Exception_Name: .. _Exception_Name:
...@@ -134,10 +134,10 @@ Exception_Name ...@@ -134,10 +134,10 @@ Exception_Name
.. index:: Exception_Name .. index:: Exception_Name
This intrinsic subprogram is used in the implementation of the 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, use of the intrinsic import in this case is the one in this unit,
so an application program should simply call the function 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. the name of the current exception.
.. _File: .. _File:
...@@ -148,10 +148,10 @@ File ...@@ -148,10 +148,10 @@ File
.. index:: File .. index:: File
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function 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. file.
.. _Line: .. _Line:
...@@ -162,10 +162,10 @@ Line ...@@ -162,10 +162,10 @@ Line
.. index:: Line .. index:: Line
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function 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. source line.
.. _Shifts_and_Rotates: .. _Shifts_and_Rotates:
...@@ -184,7 +184,7 @@ Shifts and Rotates ...@@ -184,7 +184,7 @@ Shifts and Rotates
.. index:: Rotate_Right .. index:: Rotate_Right
In standard Ada, the shift and rotate functions are available only 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 GNAT it is possible to define these functions for any integer
type (signed or modular), as in this example: type (signed or modular), as in this example:
...@@ -201,7 +201,7 @@ Shift_Left, Shift_Right, Shift_Right_Arithmetic, Rotate_Left, or ...@@ -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 Rotate_Right. T must be an integer type. T'Size must be
8, 16, 32 or 64 bits; if T is modular, the modulus 8, 16, 32 or 64 bits; if T is modular, the modulus
must be 2**8, 2**16, 2**32 or 2**64. 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 shift amount must be Natural.
The formal parameter names can be anything. The formal parameter names can be anything.
...@@ -217,9 +217,9 @@ Source_Location ...@@ -217,9 +217,9 @@ Source_Location
.. index:: Source_Location .. index:: Source_Location
This intrinsic subprogram is used in the implementation of the 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 intrinsic import in this case is the one in this unit, so an
application program should simply call the function 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. source file location.
...@@ -14,7 +14,7 @@ compatibility purposes. ...@@ -14,7 +14,7 @@ compatibility purposes.
pragma No_Run_Time 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 to the use of the "Zero Foot Print" configurable run time, but without
requiring a specially configured run time. The result of using this 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 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. ...@@ -27,8 +27,8 @@ includes just those features that are to be made accessible.
pragma Ravenscar pragma Ravenscar
================ ================
The pragma `Ravenscar` has exactly the same effect as pragma The pragma ``Ravenscar`` has exactly the same effect as pragma
`Profile (Ravenscar)`. The latter usage is preferred since it ``Profile (Ravenscar)``. The latter usage is preferred since it
is part of the new Ada 2005 standard. is part of the new Ada 2005 standard.
.. _pragma_Restricted_Run_Time: .. _pragma_Restricted_Run_Time:
...@@ -36,9 +36,9 @@ is part of the new Ada 2005 standard. ...@@ -36,9 +36,9 @@ is part of the new Ada 2005 standard.
pragma Restricted_Run_Time pragma Restricted_Run_Time
========================== ==========================
The pragma `Restricted_Run_Time` has exactly the same effect as The pragma ``Restricted_Run_Time`` has exactly the same effect as
pragma `Profile (Restricted)`. The latter usage is pragma ``Profile (Restricted)``. The latter usage is
preferred since the Ada 2005 pragma `Profile` is intended for preferred since the Ada 2005 pragma ``Profile`` is intended for
this kind of implementation dependent addition. this kind of implementation dependent addition.
.. _pragma_Task_Info: .. _pragma_Task_Info:
...@@ -46,9 +46,9 @@ this kind of implementation dependent addition. ...@@ -46,9 +46,9 @@ this kind of implementation dependent addition.
pragma Task_Info pragma Task_Info
================ ================
The functionality provided by pragma `Task_Info` is now part of the The functionality provided by pragma ``Task_Info`` is now part of the
Ada language. The `CPU` aspect and the package Ada language. The ``CPU`` aspect and the package
`System.Multiprocessors` offer a less system-dependent way to specify ``System.Multiprocessors`` offer a less system-dependent way to specify
task affinity or to query the number of processsors. task affinity or to query the number of processsors.
Syntax Syntax
...@@ -58,9 +58,9 @@ Syntax ...@@ -58,9 +58,9 @@ Syntax
pragma Task_Info (EXPRESSION); pragma Task_Info (EXPRESSION);
This pragma appears within a task definition (like pragma 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 `System.Task_Info.Task_Info_Type`. argument must be of type ``System.Task_Info.Task_Info_Type``.
The `Task_Info` pragma provides system dependent control over The ``Task_Info`` pragma provides system dependent control over
aspects of tasking implementation, for example, the ability to map aspects of tasking implementation, for example, the ability to map
tasks to specific processors. For details on the facilities available tasks to specific processors. For details on the facilities available
for the version of GNAT that you are using, see the documentation for the version of GNAT that you are using, see the documentation
...@@ -73,9 +73,9 @@ package System.Task_Info (:file:`s-tasinf.ads`) ...@@ -73,9 +73,9 @@ package System.Task_Info (:file:`s-tasinf.ads`)
=============================================== ===============================================
This package provides target dependent functionality that is used This package provides target dependent functionality that is used
to support the `Task_Info` pragma. The predefined Ada package to support the ``Task_Info`` pragma. The predefined Ada package
`System.Multiprocessors` and the `CPU` aspect now provide a ``System.Multiprocessors`` and the ``CPU`` aspect now provide a
standard replacement for GNAT's `Task_Info` functionality. standard replacement for GNAT's ``Task_Info`` functionality.
.. raw:: latex .. raw:: latex
......
...@@ -37,31 +37,31 @@ the unit is not implemented. ...@@ -37,31 +37,31 @@ the unit is not implemented.
``Ada.Assertions`` *(11.4.2)* ``Ada.Assertions`` *(11.4.2)*
`Assertions` provides the `Assert` subprograms, and also ``Assertions`` provides the ``Assert`` subprograms, and also
the declaration of the `Assertion_Error` exception. the declaration of the ``Assertion_Error`` exception.
``Ada.Asynchronous_Task_Control`` *(D.11)* ``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. synchronization. It is typically not implemented. See package spec for details.
``Ada.Calendar`` *(9.6)* ``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. manipulating times and durations.
``Ada.Calendar.Arithmetic`` *(9.6.1)* ``Ada.Calendar.Arithmetic`` *(9.6.1)*
This package provides additional arithmetic This package provides additional arithmetic
operations for `Calendar`. operations for ``Calendar``.
``Ada.Calendar.Formatting`` *(9.6.1)* ``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)* ``Ada.Calendar.Time_Zones`` *(9.6.1)*
This package provides additional `Calendar` facilities This package provides additional ``Calendar`` facilities
for handling time zones. for handling time zones.
...@@ -84,14 +84,14 @@ the unit is not implemented. ...@@ -84,14 +84,14 @@ the unit is not implemented.
that appear in type CHARACTER. It is useful for writing programs that that appear in type CHARACTER. It is useful for writing programs that
will run in international environments. For example, if you want an 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 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 will print in an understandable manner even if your environment does not
support these extended characters. support these extended characters.
``Ada.Command_Line`` *(A.15)* ``Ada.Command_Line`` *(A.15)*
This package provides access to the command line parameters and the name 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 in C), and also allows the exit status for the program to be set in a
system-independent manner. system-independent manner.
...@@ -272,7 +272,9 @@ the unit is not implemented. ...@@ -272,7 +272,9 @@ the unit is not implemented.
``Ada.Locales`` *(A.19)* ``Ada.Locales`` *(A.19)*
This package provides declarations providing information (Language 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`` ``Ada.Numerics``
...@@ -289,14 +291,14 @@ the unit is not implemented. ...@@ -289,14 +291,14 @@ the unit is not implemented.
``Ada.Numerics.Complex_Elementary_Functions`` ``Ada.Numerics.Complex_Elementary_Functions``
Provides the implementation of standard elementary functions (such as Provides the implementation of standard elementary functions (such as
log and trigonometric functions) operating on complex numbers using the log and trigonometric functions) operating on complex numbers using the
standard `Float` and the `Complex` and `Imaginary` types standard ``Float`` and the ``Complex`` and ``Imaginary`` types
created by the package `Numerics.Complex_Types`. created by the package ``Numerics.Complex_Types``.
``Ada.Numerics.Complex_Types`` ``Ada.Numerics.Complex_Types``
This is a predefined instantiation of This is a predefined instantiation of
`Numerics.Generic_Complex_Types` using `Standard.Float` to ``Numerics.Generic_Complex_Types`` using ``Standard.Float`` to
build the type `Complex` and `Imaginary`. build the type ``Complex`` and ``Imaginary``.
``Ada.Numerics.Discrete_Random`` ``Ada.Numerics.Discrete_Random``
...@@ -318,15 +320,15 @@ the unit is not implemented. ...@@ -318,15 +320,15 @@ the unit is not implemented.
* ``Short_Float`` * ``Short_Float``
`Ada.Numerics.Short_Complex_Elementary_Functions` ``Ada.Numerics.Short_Complex_Elementary_Functions``
* ``Float`` * ``Float``
`Ada.Numerics.Complex_Elementary_Functions` ``Ada.Numerics.Complex_Elementary_Functions``
* ``Long_Float`` * ``Long_Float``
`Ada.Numerics.Long_Complex_Elementary_Functions` ``Ada.Numerics.Long_Complex_Elementary_Functions``
``Ada.Numerics.Generic_Complex_Types`` ``Ada.Numerics.Generic_Complex_Types``
This is a generic package that allows the creation of complex types, This is a generic package that allows the creation of complex types,
...@@ -336,15 +338,15 @@ the unit is not implemented. ...@@ -336,15 +338,15 @@ the unit is not implemented.
* ``Short_Float`` * ``Short_Float``
`Ada.Numerics.Short_Complex_Complex_Types` ``Ada.Numerics.Short_Complex_Complex_Types``
* ``Float`` * ``Float``
`Ada.Numerics.Complex_Complex_Types` ``Ada.Numerics.Complex_Complex_Types``
* ``Long_Float`` * ``Long_Float``
`Ada.Numerics.Long_Complex_Complex_Types` ``Ada.Numerics.Long_Complex_Complex_Types``
``Ada.Numerics.Generic_Elementary_Functions`` ``Ada.Numerics.Generic_Elementary_Functions``
This is a generic package that provides the implementation of standard This is a generic package that provides the implementation of standard
...@@ -355,15 +357,15 @@ the unit is not implemented. ...@@ -355,15 +357,15 @@ the unit is not implemented.
* ``Short_Float`` * ``Short_Float``
`Ada.Numerics.Short_Elementary_Functions` ``Ada.Numerics.Short_Elementary_Functions``
* ``Float`` * ``Float``
`Ada.Numerics.Elementary_Functions` ``Ada.Numerics.Elementary_Functions``
* ``Long_Float`` * ``Long_Float``
`Ada.Numerics.Long_Elementary_Functions` ``Ada.Numerics.Long_Elementary_Functions``
``Ada.Numerics.Generic_Real_Arrays`` *(G.3.1)* ``Ada.Numerics.Generic_Real_Arrays`` *(G.3.1)*
Generic operations on arrays of reals Generic operations on arrays of reals
...@@ -372,7 +374,7 @@ the unit is not implemented. ...@@ -372,7 +374,7 @@ the unit is not implemented.
Preinstantiation of Ada.Numerics.Generic_Real_Arrays (Float). Preinstantiation of Ada.Numerics.Generic_Real_Arrays (Float).
``Ada.Real_Time`` *(D.8)* ``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 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 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 guarantees this behavior, but of course if the external clock on which
...@@ -394,12 +396,12 @@ the unit is not implemented. ...@@ -394,12 +396,12 @@ the unit is not implemented.
``Ada.Streams`` *(13.13.1)* ``Ada.Streams`` *(13.13.1)*
This is a generic package that provides the basic support for the This is a generic package that provides the basic support for the
concept of streams as used by the stream attributes (`Input`, concept of streams as used by the stream attributes (``Input``,
`Output`, `Read` and `Write`). ``Output``, ``Read`` and ``Write``).
``Ada.Streams.Stream_IO`` *(A.12.1)* ``Ada.Streams.Stream_IO`` *(A.12.1)*
This package is a specialization of the type `Streams` defined in This package is a specialization of the type ``Streams`` defined in
package `Streams` together with a set of operations providing package ``Streams`` together with a set of operations providing
Stream_IO capability. The Stream_IO model permits both random and Stream_IO capability. The Stream_IO model permits both random and
sequential access to a file which can contain an arbitrary set of values sequential access to a file which can contain an arbitrary set of values
of one or more Ada types. of one or more Ada types.
...@@ -511,8 +513,8 @@ the unit is not implemented. ...@@ -511,8 +513,8 @@ the unit is not implemented.
``Ada.Strings.Wide_Unbounded`` *(A.4.7)* ``Ada.Strings.Wide_Unbounded`` *(A.4.7)*
These packages provide analogous capabilities to the corresponding These packages provide analogous capabilities to the corresponding
packages without ``Wide_`` in the name, but operate with the types packages without ``Wide_`` in the name, but operate with the types
`Wide_String` and `Wide_Character` instead of `String` ``Wide_String`` and ``Wide_Character`` instead of ``String``
and `Character`. Versions of all the child packages are available. and ``Character``. Versions of all the child packages are available.
``Ada.Strings.Wide_Wide_Bounded`` *(A.4.7)* ``Ada.Strings.Wide_Wide_Bounded`` *(A.4.7)*
...@@ -523,8 +525,8 @@ the unit is not implemented. ...@@ -523,8 +525,8 @@ the unit is not implemented.
``Ada.Strings.Wide_Wide_Unbounded`` *(A.4.7)* ``Ada.Strings.Wide_Wide_Unbounded`` *(A.4.7)*
These packages provide analogous capabilities to the corresponding These packages provide analogous capabilities to the corresponding
packages without ``Wide_`` in the name, but operate with the types packages without ``Wide_`` in the name, but operate with the types
`Wide_Wide_String` and `Wide_Wide_Character` instead ``Wide_Wide_String`` and ``Wide_Wide_Character`` instead
of `String` and `Character`. of ``String`` and ``Character``.
``Ada.Synchronous_Barriers`` *(D.10.1)* ``Ada.Synchronous_Barriers`` *(D.10.1)*
This package provides facilities for synchronizing tasks at a low level This package provides facilities for synchronizing tasks at a low level
...@@ -578,15 +580,15 @@ the unit is not implemented. ...@@ -578,15 +580,15 @@ the unit is not implemented.
* ``Short_Float`` * ``Short_Float``
`Short_Float_Text_IO` ``Short_Float_Text_IO``
* ``Float`` * ``Float``
`Float_Text_IO` ``Float_Text_IO``
* ``Long_Float`` * ``Long_Float``
`Long_Float_Text_IO` ``Long_Float_Text_IO``
``Ada.Text_IO.Integer_IO`` ``Ada.Text_IO.Integer_IO``
Provides input-output facilities for integer types. The following Provides input-output facilities for integer types. The following
...@@ -594,23 +596,23 @@ the unit is not implemented. ...@@ -594,23 +596,23 @@ the unit is not implemented.
* ``Short_Short_Integer`` * ``Short_Short_Integer``
`Ada.Short_Short_Integer_Text_IO` ``Ada.Short_Short_Integer_Text_IO``
* ``Short_Integer`` * ``Short_Integer``
`Ada.Short_Integer_Text_IO` ``Ada.Short_Integer_Text_IO``
* ``Integer`` * ``Integer``
`Ada.Integer_Text_IO` ``Ada.Integer_Text_IO``
* ``Long_Integer`` * ``Long_Integer``
`Ada.Long_Integer_Text_IO` ``Ada.Long_Integer_Text_IO``
* ``Long_Long_Integer`` * ``Long_Long_Integer``
`Ada.Long_Long_Integer_Text_IO` ``Ada.Long_Long_Integer_Text_IO``
``Ada.Text_IO.Modular_IO`` ``Ada.Text_IO.Modular_IO``
Provides input-output facilities for modular (unsigned) types. Provides input-output facilities for modular (unsigned) types.
...@@ -691,17 +693,17 @@ the unit is not implemented. ...@@ -691,17 +693,17 @@ the unit is not implemented.
allocated by use of an allocator. allocated by use of an allocator.
``Ada.Wide_Text_IO`` *(A.11)* ``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 file supports wide character representations, and the internal types are
`Wide_Character` and `Wide_String` instead of `Character` ``Wide_Character`` and ``Wide_String`` instead of ``Character``
and `String`. The corresponding set of nested packages and child and ``String``. The corresponding set of nested packages and child
packages are defined. packages are defined.
``Ada.Wide_Wide_Text_IO`` *(A.11)* ``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 file supports wide character representations, and the internal types are
`Wide_Character` and `Wide_String` instead of `Character` ``Wide_Character`` and ``Wide_String`` instead of ``Character``
and `String`. The corresponding set of nested packages and child and ``String``. The corresponding set of nested packages and child
packages are defined. packages are defined.
For packages in Interfaces and System, all the RM defined packages are For packages in Interfaces and System, all the RM defined packages are
......
GNAT User's Guide for Native Platforms GNAT User's Guide for Native Platforms
====================================== ======================================
*GNAT, The GNU Ada Development Environment* .. only:: not latex
.. only:: PRO *GNAT, The GNU Ada Development Environment*
*GNAT Pro Edition* .. only:: PRO
| Version |version| *GNAT Pro Edition*
| Date: |today|
.. only:: GPL | Version |version|
| Date: |today|
*GNAT GPL Edition* .. only:: GPL
| Version |version| *GNAT GPL Edition*
| Date: |today|
.. only:: FSF | Version |version|
| Date: |today|
.. raw:: texinfo .. only:: FSF
@include gcc-common.texi .. raw:: texinfo
GCC version @value{version-GCC}@*
AdaCore @include gcc-common.texi
GCC version @value{version-GCC}@*
Permission is granted to copy, distribute and/or modify this document AdaCore
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no Permission is granted to copy, distribute and/or modify this document
Invariant Sections, with the Front-Cover Texts being under the terms of the GNU Free Documentation License, Version 1.3 or
"GNAT User's Guide for Native Platforms", any later version published by the Free Software Foundation; with no
and with no Back-Cover Texts. A copy of the license is Invariant Sections, with the Front-Cover Texts being
included in the section entitled :ref:`gnu_fdl`. "GNAT User's Guide for Native Platforms",
and with no Back-Cover Texts. A copy of the license is
included in the section entitled :ref:`gnu_fdl`.
.. toctree:: .. toctree::
:maxdepth: 3 :maxdepth: 3
......
...@@ -117,7 +117,7 @@ the new document structure. ...@@ -117,7 +117,7 @@ the new document structure.
* :ref:`The_GNAT_Compilation_Model` has been extended so that it now covers * :ref:`The_GNAT_Compilation_Model` has been extended so that it now covers
the following material: the following material:
- The `gnatname`, `gnatkr`, and `gnatchop` tools - The ``gnatname``, ``gnatkr``, and ``gnatchop`` tools
- :ref:`Configuration_Pragmas` - :ref:`Configuration_Pragmas`
- :ref:`GNAT_and_Libraries` - :ref:`GNAT_and_Libraries`
- :ref:`Conditional_Compilation` including :ref:`Preprocessing_with_gnatprep` - :ref:`Conditional_Compilation` including :ref:`Preprocessing_with_gnatprep`
...@@ -173,9 +173,9 @@ the new document structure. ...@@ -173,9 +173,9 @@ the new document structure.
- :ref:`Microsoft_Windows_Topics` - :ref:`Microsoft_Windows_Topics`
- :ref:`Mac_OS_Topics` - :ref:`Mac_OS_Topics`
* The `Compatibility and Porting Guide` appendix has been moved to the * The *Compatibility and Porting Guide* appendix has been moved to the
:title:`GNAT Reference Manual`. It now includes a section :title:`GNAT Reference Manual`. It now includes a section
`Writing Portable Fixed-Point Declarations` which was previously *Writing Portable Fixed-Point Declarations* which was previously
a separate chapter in the :title:`GNAT User's Guide`. a separate chapter in the :title:`GNAT User's Guide`.
...@@ -188,14 +188,14 @@ Conventions ...@@ -188,14 +188,14 @@ Conventions
Following are examples of the typographical and graphic conventions used Following are examples of the typographical and graphic conventions used
in this guide: in this guide:
* `Functions`, `utility program names`, `standard names`, * ``Functions``, ``utility program names``, ``standard names``,
and `classes`. and ``classes``.
* `Option flags` * ``Option flags``
* :file:`File names` * :file:`File names`
* `Variables` * ``Variables``
* *Emphasis* * *Emphasis*
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -731,13 +731,13 @@ Comments have been added for clarification purposes. ...@@ -731,13 +731,13 @@ Comments have been added for clarification purposes.
The Ada code in the above example is exactly what is generated by the The Ada code in the above example is exactly what is generated by the
binder. We have added comments to more clearly indicate the function binder. We have added comments to more clearly indicate the function
of each part of the generated `Ada_Main` package. of each part of the generated ``Ada_Main`` package.
The code is standard Ada in all respects, and can be processed by any The code is standard Ada in all respects, and can be processed by any
tools that handle Ada. In particular, it is possible to use the debugger tools that handle Ada. In particular, it is possible to use the debugger
in Ada mode to debug the generated `Ada_Main` package. For example, in Ada mode to debug the generated ``Ada_Main`` package. For example,
suppose that for reasons that you do not understand, your program is crashing suppose that for reasons that you do not understand, your program is crashing
during elaboration of the body of `Ada.Text_IO`. To locate this bug, during elaboration of the body of ``Ada.Text_IO``. To locate this bug,
you can place a breakpoint on the call: you can place a breakpoint on the call:
.. code-block:: ada .. code-block:: ada
......
.. role:: switch(samp)
.. _Getting_Started_with_GNAT: .. _Getting_Started_with_GNAT:
************************* *************************
...@@ -27,7 +29,7 @@ file: ...@@ -27,7 +29,7 @@ file:
* The file(s) must be bound using the GNAT binder. * The file(s) must be bound using the GNAT binder.
* All appropriate object files must be linked to produce an executable. * All appropriate object files must be linked to produce an executable.
All three steps are most commonly handled by using the *gnatmake* All three steps are most commonly handled by using the ``gnatmake``
utility program that, given the name of the main program, automatically utility program that, given the name of the main program, automatically
performs the necessary compilation, binding and linking steps. performs the necessary compilation, binding and linking steps.
...@@ -61,15 +63,15 @@ with periods replaced by hyphens; the ...@@ -61,15 +63,15 @@ with periods replaced by hyphens; the
extension is :file:`ads` for a extension is :file:`ads` for a
spec and :file:`adb` for a body. spec and :file:`adb` for a body.
You can override this default file naming convention by use of the You can override this default file naming convention by use of the
special pragma `Source_File_Name` (for further information please special pragma ``Source_File_Name`` (for further information please
see :ref:`Using_Other_File_Names`). see :ref:`Using_Other_File_Names`).
Alternatively, if you want to rename your files according to this default Alternatively, if you want to rename your files according to this default
convention, which is probably more convenient if you will be using GNAT convention, which is probably more convenient if you will be using GNAT
for all your compilations, then the `gnatchop` utility for all your compilations, then the ``gnatchop`` utility
can be used to generate correctly-named source files can be used to generate correctly-named source files
(see :ref:`Renaming_Files_with_gnatchop`). (see :ref:`Renaming_Files_with_gnatchop`).
You can compile the program using the following command (`$` is used You can compile the program using the following command (``$`` is used
as the command prompt in the examples in this document): as the command prompt in the examples in this document):
.. code-block:: sh .. code-block:: sh
...@@ -77,15 +79,15 @@ as the command prompt in the examples in this document): ...@@ -77,15 +79,15 @@ as the command prompt in the examples in this document):
$ gcc -c hello.adb $ gcc -c hello.adb
*gcc* is the command used to run the compiler. This compiler is ``gcc`` is the command used to run the compiler. This compiler is
capable of compiling programs in several languages, including Ada and capable of compiling programs in several languages, including Ada and
C. It assumes that you have given it an Ada program if the file extension is C. It assumes that you have given it an Ada program if the file extension is
either :file:`.ads` or :file:`.adb`, and it will then call either :file:`.ads` or :file:`.adb`, and it will then call
the GNAT compiler to compile the specified file. the GNAT compiler to compile the specified file.
The :option:`-c` switch is required. It tells *gcc* to only do a The :switch:`-c` switch is required. It tells ``gcc`` to only do a
compilation. (For C programs, *gcc* can also do linking, but this compilation. (For C programs, ``gcc`` can also do linking, but this
capability is not used directly for Ada programs, so the :option:`-c` capability is not used directly for Ada programs, so the :switch:`-c`
switch must always be present.) switch must always be present.)
This compile command generates a file This compile command generates a file
...@@ -95,9 +97,9 @@ an 'Ada Library Information' file :file:`hello.ali`, ...@@ -95,9 +97,9 @@ an 'Ada Library Information' file :file:`hello.ali`,
which contains additional information used to check which contains additional information used to check
that an Ada program is consistent. that an Ada program is consistent.
To build an executable file, To build an executable file,
use `gnatbind` to bind the program use ``gnatbind`` to bind the program
and *gnatlink* to link it. The and ``gnatlink`` to link it. The
argument to both `gnatbind` and *gnatlink* is the name of the argument to both ``gnatbind`` and ``gnatlink`` is the name of the
:file:`ALI` file, but the default extension of :file:`.ali` can :file:`ALI` file, but the default extension of :file:`.ali` can
be omitted. This means that in the most common case, the argument be omitted. This means that in the most common case, the argument
is simply the name of the main program: is simply the name of the main program:
...@@ -107,14 +109,14 @@ is simply the name of the main program: ...@@ -107,14 +109,14 @@ is simply the name of the main program:
$ gnatbind hello $ gnatbind hello
$ gnatlink hello $ gnatlink hello
A simpler method of carrying out these steps is to use *gnatmake*, A simpler method of carrying out these steps is to use ``gnatmake``,
a master program that invokes all the required a master program that invokes all the required
compilation, binding and linking tools in the correct order. In particular, compilation, binding and linking tools in the correct order. In particular,
*gnatmake* automatically recompiles any sources that have been ``gnatmake`` automatically recompiles any sources that have been
modified since they were last compiled, or sources that depend modified since they were last compiled, or sources that depend
on such modified sources, so that 'version skew' is avoided. on such modified sources, so that 'version skew' is avoided.
.. index:: Version skew (avoided by *gnatmake*) .. index:: Version skew (avoided by ``gnatmake``)
.. code-block:: sh .. code-block:: sh
...@@ -178,11 +180,11 @@ following three separate files: ...@@ -178,11 +180,11 @@ following three separate files:
*greetings.ads* *greetings.ads*
spec of package `Greetings` spec of package ``Greetings``
*greetings.adb* *greetings.adb*
body of package `Greetings` body of package ``Greetings``
*gmain.adb* *gmain.adb*
...@@ -204,7 +206,7 @@ In particular it is perfectly fine to compile the main program first. ...@@ -204,7 +206,7 @@ In particular it is perfectly fine to compile the main program first.
Also, it is not necessary to compile package specs in the case where Also, it is not necessary to compile package specs in the case where
there is an accompanying body; you only need to compile the body. If you want there is an accompanying body; you only need to compile the body. If you want
to submit these files to the compiler for semantic checking and not code to submit these files to the compiler for semantic checking and not code
generation, then use the :option:`-gnatc` switch: generation, then use the :switch:`-gnatc` switch:
.. code-block:: sh .. code-block:: sh
...@@ -212,7 +214,7 @@ generation, then use the :option:`-gnatc` switch: ...@@ -212,7 +214,7 @@ generation, then use the :option:`-gnatc` switch:
Although the compilation can be done in separate steps as in the Although the compilation can be done in separate steps as in the
above example, in practice it is almost always more convenient above example, in practice it is almost always more convenient
to use the *gnatmake* tool. All you need to know in this case to use the ``gnatmake`` tool. All you need to know in this case
is the name of the main program's source file. The effect of the above four is the name of the main program's source file. The effect of the above four
commands can be achieved with a single one: commands can be achieved with a single one:
...@@ -220,16 +222,16 @@ commands can be achieved with a single one: ...@@ -220,16 +222,16 @@ commands can be achieved with a single one:
$ gnatmake gmain.adb $ gnatmake gmain.adb
In the next section we discuss the advantages of using *gnatmake* in In the next section we discuss the advantages of using ``gnatmake`` in
more detail. more detail.
.. _Using_the_gnatmake_Utility: .. _Using_the_gnatmake_Utility:
Using the *gnatmake* Utility Using the ``gnatmake`` Utility
============================ ==============================
If you work on a program by compiling single components at a time using If you work on a program by compiling single components at a time using
*gcc*, you typically keep track of the units you modify. In order to ``gcc``, you typically keep track of the units you modify. In order to
build a consistent system, you compile not only these units, but also any build a consistent system, you compile not only these units, but also any
units that depend on the units you have modified. units that depend on the units you have modified.
For example, in the preceding case, For example, in the preceding case,
...@@ -238,7 +240,7 @@ you edit :file:`greetings.ads`, you must recompile both ...@@ -238,7 +240,7 @@ you edit :file:`greetings.ads`, you must recompile both
:file:`greetings.adb` and :file:`gmain.adb`, because both files contain :file:`greetings.adb` and :file:`gmain.adb`, because both files contain
units that depend on :file:`greetings.ads`. units that depend on :file:`greetings.ads`.
*gnatbind* will warn you if you forget one of these compilation ``gnatbind`` will warn you if you forget one of these compilation
steps, so that it is impossible to generate an inconsistent program as a steps, so that it is impossible to generate an inconsistent program as a
result of forgetting to do a compilation. Nevertheless it is tedious and result of forgetting to do a compilation. Nevertheless it is tedious and
error-prone to keep track of dependencies among units. error-prone to keep track of dependencies among units.
...@@ -248,7 +250,7 @@ if the dependencies change as you change the program, you must make ...@@ -248,7 +250,7 @@ if the dependencies change as you change the program, you must make
sure that the makefile is kept up-to-date manually, which is also an sure that the makefile is kept up-to-date manually, which is also an
error-prone process. error-prone process.
The *gnatmake* utility takes care of these details automatically. The ``gnatmake`` utility takes care of these details automatically.
Invoke it using either one of the following forms: Invoke it using either one of the following forms:
.. code-block:: sh .. code-block:: sh
...@@ -257,19 +259,19 @@ Invoke it using either one of the following forms: ...@@ -257,19 +259,19 @@ Invoke it using either one of the following forms:
$ gnatmake gmain $ gnatmake gmain
The argument is the name of the file containing the main program; The argument is the name of the file containing the main program;
you may omit the extension. *gnatmake* you may omit the extension. ``gnatmake``
examines the environment, automatically recompiles any files that need examines the environment, automatically recompiles any files that need
recompiling, and binds and links the resulting set of object files, recompiling, and binds and links the resulting set of object files,
generating the executable file, :file:`gmain`. generating the executable file, :file:`gmain`.
In a large program, it In a large program, it
can be extremely helpful to use *gnatmake*, because working out by hand can be extremely helpful to use ``gnatmake``, because working out by hand
what needs to be recompiled can be difficult. what needs to be recompiled can be difficult.
Note that *gnatmake* takes into account all the Ada rules that Note that ``gnatmake`` takes into account all the Ada rules that
establish dependencies among units. These include dependencies that result establish dependencies among units. These include dependencies that result
from inlining subprogram bodies, and from from inlining subprogram bodies, and from
generic instantiation. Unlike some other generic instantiation. Unlike some other
Ada make tools, *gnatmake* does not rely on the dependencies that were Ada make tools, ``gnatmake`` does not rely on the dependencies that were
found by the compiler on a previous compilation, which may possibly found by the compiler on a previous compilation, which may possibly
be wrong when sources change. *gnatmake* determines the exact set of be wrong when sources change. ``gnatmake`` determines the exact set of
dependencies from scratch each time it is run. dependencies from scratch each time it is run.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment