From: Arnaud Charlet Date: Tue, 2 Jun 2020 12:40:26 +0000 (-0400) Subject: [Ada] Documentation cleanups X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c75d0f23c01a51a795ffa9c31d1c0b09a38417b;p=gcc.git [Ada] Documentation cleanups gcc/ada/ * doc/gnat_ugn/about_this_guide.rst: Remove old section and update for Ada 202x. * doc/gnat_ugn/getting_started_with_gnat.rst: Add a system requirements section. Remove obsolete section and minimal rewording on the getting started section. * gnat_ugn.texi: Regenerate. --- diff --git a/gcc/ada/doc/gnat_ugn/about_this_guide.rst b/gcc/ada/doc/gnat_ugn/about_this_guide.rst index 1ab2f4cfa38..33476264231 100644 --- a/gcc/ada/doc/gnat_ugn/about_this_guide.rst +++ b/gcc/ada/doc/gnat_ugn/about_this_guide.rst @@ -14,13 +14,13 @@ toolset for the full Ada programming language. It documents the features of the compiler and tools, and explains how to use them to build Ada applications. -GNAT implements Ada 95, Ada 2005 and Ada 2012, and it may also be +GNAT implements Ada 95, Ada 2005, Ada 2012, and Ada 202x, and it may also be invoked in Ada 83 compatibility mode. By default, GNAT assumes Ada 2012, but you can override with a compiler switch (:ref:`Compiling_Different_Versions_of_Ada`) to explicitly specify the language version. Throughout this manual, references to 'Ada' without a year suffix -apply to all Ada 95/2005/2012 versions of the language. +apply to all Ada versions of the language, starting with Ada 95. What This Guide Contains ======================== @@ -71,8 +71,6 @@ What You Should Know before Reading This Guide This guide assumes a basic familiarity with the Ada 95 language, as described in the International Standard ANSI/ISO/IEC-8652:1995, January 1995. -It does not require knowledge of the features introduced by Ada 2005 -or Ada 2012. Reference manuals for Ada 95, Ada 2005, and Ada 2012 are included in the GNAT documentation package. @@ -104,81 +102,6 @@ following documents: environment Emacs. -A Note to Readers of Previous Versions of the Manual -==================================================== - -In early 2015 the GNAT manuals were transitioned to the -reStructuredText (rst) / Sphinx documentation generator technology. -During that process the :title:`GNAT User's Guide` was reorganized -so that related topics would be described together in the same chapter -or appendix. Here's a summary of the major changes realized in -the new document structure. - -* :ref:`The_GNAT_Compilation_Model` has been extended so that it now covers - the following material: - - - The ``gnatname``, ``gnatkr``, and ``gnatchop`` tools - - :ref:`Configuration_Pragmas` - - :ref:`GNAT_and_Libraries` - - :ref:`Conditional_Compilation` including :ref:`Preprocessing_with_gnatprep` - and :ref:`Integrated_Preprocessing` - - :ref:`Generating_Ada_Bindings_for_C_and_C++_headers` - - :ref:`Using_GNAT_Files_with_External_Tools` - -* :ref:`Building_Executable_Programs_With_GNAT` is a new chapter consolidating - the following content: - - - :ref:`The_GNAT_Make_Program_gnatmake` - - :ref:`Compiling_with_GCC` - - :ref:`Binding_with_gnatbind` - - :ref:`Linking_with_gnatlink` - - :ref:`Using_the_GNU_make_Utility` - -* :ref:`GNAT_Utility_Programs` is a new chapter consolidating the information about several - GNAT tools: - - .. only:: PRO or GPL - - - :ref:`The_File_Cleanup_Utility_gnatclean` - - :ref:`The_GNAT_Library_Browser_gnatls` - - :ref:`The_Cross-Referencing_Tools_gnatxref_and_gnatfind` - - :ref:`The_Ada_to_HTML_Converter_gnathtml` - - :ref:`The_Ada-to-XML_Converter_gnat2xml` - - :ref:`The_Coding_Standard_Verifier_gnatcheck` - - :ref:`The_GNAT_Metrics_Tool_gnatmetric` - - :ref:`The_GNAT_Pretty_Printer_gnatpp` - - :ref:`The_Body_Stub_Generator_gnatstub` - - :ref:`The_Unit_Test_Generator_gnattest` - - .. only:: FSF - - - :ref:`The_File_Cleanup_Utility_gnatclean` - - :ref:`The_GNAT_Library_Browser_gnatls` - - :ref:`The_Cross-Referencing_Tools_gnatxref_and_gnatfind` - - :ref:`The_Ada_to_HTML_Converter_gnathtml` - -* :ref:`GNAT_and_Program_Execution` is a new chapter consolidating the following: - - - :ref:`Running_and_Debugging_Ada_Programs` - - :ref:`Profiling` - - :ref:`Improving_Performance` - - :ref:`Overflow Check Handling in GNAT ` - - :ref:`Performing Dimensionality Analysis in GNAT ` - - :ref:`Stack_Related_Facilities` - - :ref:`Memory_Management_Issues` - -* :ref:`Platform_Specific_Information` is a new appendix consolidating the following: - - - :ref:`Run_Time_Libraries` - - :ref:`Microsoft_Windows_Topics` - - :ref:`Mac_OS_Topics` - -* The *Compatibility and Porting Guide* appendix has been moved to the - :title:`GNAT Reference Manual`. It now includes a section - *Writing Portable Fixed-Point Declarations* which was previously - a separate chapter in the :title:`GNAT User's Guide`. - - Conventions =========== .. index:: Conventions, typographical diff --git a/gcc/ada/doc/gnat_ugn/getting_started_with_gnat.rst b/gcc/ada/doc/gnat_ugn/getting_started_with_gnat.rst index 34dc35504ab..9814cb6d57c 100644 --- a/gcc/ada/doc/gnat_ugn/getting_started_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/getting_started_with_gnat.rst @@ -9,14 +9,43 @@ Getting Started with GNAT This chapter describes how to use GNAT's command line interface to build executable Ada programs. On most platforms a visually oriented Integrated Development Environment -is also available, the GNAT Programming Studio (GNAT Studio). +is also available: GNAT Studio. GNAT Studio offers a graphical "look and feel", support for development in other programming languages, comprehensive browsing features, and many other capabilities. -For information on GNAT Studio please refer to -:title:`Using the GNAT Programming Studio`. +For information on GNAT Studio please refer to the +:title:`GNAT Studio documentation`. +.. _System_Requirements: + +System Requirements +=================== + +Even though any machine can run the GNAT toolset and GNAT Studio IDE, in order +to get the best experience, we recommend using a machine with as many cores +as possible since all individual compilations can run in parallel. +A comfortable setup for a compiler server is a machine with 24 physical cores +or more, with at least 48 GB of memory (2 GB per core). + +For a desktop machine, a minimum of 4 cores is recommended (8 preferred), +with at least 2GB per core (so 8 to 16GB). + +In addition, for running and navigating sources in GNAT Studio smoothly, we +recommend at least 1.5 GB plus 3 GB of RAM per 1 million source line of code. +In other words, we recommend at least 3 GB for for 500K lines of code and +7.5 GB for 2 million lines of code. + +Note that using local and fast drives will also make a difference in terms of +build and link time. Network drives such as NFS, SMB, or worse, configuration +management filesystems (such as ClearCase dynamic views) should be avoided as +much as possible and will produce very degraded performance (typically 2 to 3 +times slower than on local fast drives). If such slow drives cannot be avoided +for accessing the source code, then you should at least configure your project +file so that the result of the compilation is stored on a drive local to the +machine performing the run. This can be achieved by setting the ``Object_Dir`` +project file attribute. + .. _Running_GNAT: Running GNAT @@ -96,24 +125,12 @@ file corresponding to your Ada program. It also generates an 'Ada Library Information' file :file:`hello.ali`, which contains additional information used to check that an Ada program is consistent. -To build an executable file, -use ``gnatbind`` to bind the program -and ``gnatlink`` to link it. The -argument to both ``gnatbind`` and ``gnatlink`` is the name of the -:file:`ALI` file, but the default extension of :file:`.ali` can -be omitted. This means that in the most common case, the argument -is simply the name of the main program: - -.. code-block:: sh - - $ gnatbind hello - $ gnatlink hello -A simpler method of carrying out these steps is to use ``gnatmake``, -a master program that invokes all the required -compilation, binding and linking tools in the correct order. In particular, -``gnatmake`` automatically recompiles any sources that have been -modified since they were last compiled, or sources that depend +To build an executable file, use either ``gnatmake`` or gprbuild with +the name of the main file: these tools are builders that will take care of +all the necessary build steps in the correct order. +In particular, these builders automatically recompile any sources that have +been modified since they were last compiled, or sources that depend on such modified sources, so that 'version skew' is avoided. .. index:: Version skew (avoided by ``gnatmake``) @@ -190,17 +207,6 @@ following three separate files: *gmain.adb* body of main program -To build an executable version of -this program, we could use four separate steps to compile, bind, and link -the program, as follows: - -.. code-block:: sh - - $ gcc -c gmain.adb - $ gcc -c greetings.adb - $ gnatbind gmain - $ gnatlink gmain - Note that there is no required order of compilation when using GNAT. 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 @@ -212,66 +218,10 @@ generation, then use the :switch:`-gnatc` switch: $ gcc -c greetings.ads -gnatc -Although the compilation can be done in separate steps as in the -above example, in practice it is almost always more convenient -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 -commands can be achieved with a single one: +Although the compilation can be done in separate steps, in practice it is +almost always more convenient to use the ``gnatmake`` or ``gprbuild`` tools: .. code-block:: sh $ gnatmake gmain.adb -In the next section we discuss the advantages of using ``gnatmake`` in -more detail. - -.. _Using_the_gnatmake_Utility: - -Using the ``gnatmake`` Utility -============================== - -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 -build a consistent system, you compile not only these units, but also any -units that depend on the units you have modified. -For example, in the preceding case, -if you edit :file:`gmain.adb`, you only need to recompile that file. But if -you edit :file:`greetings.ads`, you must recompile both -:file:`greetings.adb` and :file:`gmain.adb`, because both files contain -units that depend on :file:`greetings.ads`. - -``gnatbind`` will warn you if you forget one of these compilation -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 -error-prone to keep track of dependencies among units. -One approach to handle the dependency-bookkeeping is to use a -makefile. However, makefiles present maintenance problems of their own: -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 -error-prone process. - -The ``gnatmake`` utility takes care of these details automatically. -Invoke it using either one of the following forms: - -.. code-block:: sh - - $ gnatmake gmain.adb - $ gnatmake gmain - -The argument is the name of the file containing the main program; -you may omit the extension. ``gnatmake`` -examines the environment, automatically recompiles any files that need -recompiling, and binds and links the resulting set of object files, -generating the executable file, :file:`gmain`. -In a large program, it -can be extremely helpful to use ``gnatmake``, because working out by hand -what needs to be recompiled can be difficult. - -Note that ``gnatmake`` takes into account all the Ada rules that -establish dependencies among units. These include dependencies that result -from inlining subprogram bodies, and from -generic instantiation. Unlike some other -Ada make tools, ``gnatmake`` does not rely on the dependencies that were -found by the compiler on a previous compilation, which may possibly -be wrong when sources change. ``gnatmake`` determines the exact set of -dependencies from scratch each time it is run. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index fc49da1b2ba..000d359d171 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -85,15 +85,14 @@ About This Guide * What This Guide Contains:: * What You Should Know before Reading This Guide:: * Related Information:: -* A Note to Readers of Previous Versions of the Manual:: * Conventions:: Getting Started with GNAT +* System Requirements:: * Running GNAT:: * Running a Simple Ada Program:: * Running a Program with Multiple Units:: -* Using the gnatmake Utility:: The GNAT Compilation Model @@ -571,19 +570,18 @@ toolset for the full Ada programming language. It documents the features of the compiler and tools, and explains how to use them to build Ada applications. -GNAT implements Ada 95, Ada 2005 and Ada 2012, and it may also be +GNAT implements Ada 95, Ada 2005, Ada 2012, and Ada 202x, and it may also be invoked in Ada 83 compatibility mode. By default, GNAT assumes Ada 2012, but you can override with a compiler switch (@ref{6,,Compiling Different Versions of Ada}) to explicitly specify the language version. Throughout this manual, references to 'Ada' without a year suffix -apply to all Ada 95/2005/2012 versions of the language. +apply to all Ada versions of the language, starting with Ada 95. @menu * What This Guide Contains:: * What You Should Know before Reading This Guide:: * Related Information:: -* A Note to Readers of Previous Versions of the Manual:: * Conventions:: @end menu @@ -656,12 +654,10 @@ in an Ada program. This guide assumes a basic familiarity with the Ada 95 language, as described in the International Standard ANSI/ISO/IEC-8652:1995, January 1995. -It does not require knowledge of the features introduced by Ada 2005 -or Ada 2012. Reference manuals for Ada 95, Ada 2005, and Ada 2012 are included in the GNAT documentation package. -@node Related Information,A Note to Readers of Previous Versions of the Manual,What You Should Know before Reading This Guide,About This Guide +@node Related Information,Conventions,What You Should Know before Reading This Guide,About This Guide @anchor{gnat_ugn/about_this_guide related-information}@anchor{12} @section Related Information @@ -699,145 +695,8 @@ for full information on the extensible editor and programming environment Emacs. @end itemize -@node A Note to Readers of Previous Versions of the Manual,Conventions,Related Information,About This Guide -@anchor{gnat_ugn/about_this_guide a-note-to-readers-of-previous-versions-of-the-manual}@anchor{13} -@section A Note to Readers of Previous Versions of the Manual - - -In early 2015 the GNAT manuals were transitioned to the -reStructuredText (rst) / Sphinx documentation generator technology. -During that process the @cite{GNAT User's Guide} was reorganized -so that related topics would be described together in the same chapter -or appendix. Here's a summary of the major changes realized in -the new document structure. - - -@itemize * - -@item -@ref{9,,The GNAT Compilation Model} has been extended so that it now covers -the following material: - - -@itemize - - -@item -The @code{gnatname}, @code{gnatkr}, and @code{gnatchop} tools - -@item -@ref{14,,Configuration Pragmas} - -@item -@ref{15,,GNAT and Libraries} - -@item -@ref{16,,Conditional Compilation} including @ref{17,,Preprocessing with gnatprep} -and @ref{18,,Integrated Preprocessing} - -@item -@ref{19,,Generating Ada Bindings for C and C++ headers} - -@item -@ref{1a,,Using GNAT Files with External Tools} -@end itemize - -@item -@ref{a,,Building Executable Programs with GNAT} is a new chapter consolidating -the following content: - - -@itemize - - -@item -@ref{1b,,Building with gnatmake} - -@item -@ref{1c,,Compiling with gcc} - -@item -@ref{1d,,Binding with gnatbind} - -@item -@ref{1e,,Linking with gnatlink} - -@item -@ref{1f,,Using the GNU make Utility} -@end itemize - -@item -@ref{b,,GNAT Utility Programs} is a new chapter consolidating the information about several -GNAT tools: - - - -@itemize - - -@item -@ref{20,,The File Cleanup Utility gnatclean} - -@item -@ref{21,,The GNAT Library Browser gnatls} - -@item -@ref{22,,The Cross-Referencing Tools gnatxref and gnatfind} - -@item -@ref{23,,The Ada to HTML Converter gnathtml} -@end itemize - -@item -@ref{c,,GNAT and Program Execution} is a new chapter consolidating the following: - - -@itemize - - -@item -@ref{24,,Running and Debugging Ada Programs} - -@item -@ref{25,,Profiling} - -@item -@ref{26,,Improving Performance} - -@item -@ref{27,,Overflow Check Handling in GNAT} - -@item -@ref{28,,Performing Dimensionality Analysis in GNAT} - -@item -@ref{29,,Stack Related Facilities} - -@item -@ref{2a,,Memory Management Issues} -@end itemize - -@item -@ref{d,,Platform-Specific Information} is a new appendix consolidating the following: - - -@itemize - - -@item -@ref{2b,,Run-Time Libraries} - -@item -@ref{2c,,Microsoft Windows Topics} - -@item -@ref{2d,,Mac OS Topics} -@end itemize - -@item -The @emph{Compatibility and Porting Guide} appendix has been moved to the -@cite{GNAT Reference Manual}. It now includes a section -@emph{Writing Portable Fixed-Point Declarations} which was previously -a separate chapter in the @cite{GNAT User's Guide}. -@end itemize - -@node Conventions,,A Note to Readers of Previous Versions of the Manual,About This Guide -@anchor{gnat_ugn/about_this_guide conventions}@anchor{2e} +@node Conventions,,Related Information,About This Guide +@anchor{gnat_ugn/about_this_guide conventions}@anchor{13} @section Conventions @@ -890,30 +749,59 @@ the '\' character should be used instead. @end itemize @node Getting Started with GNAT,The GNAT Compilation Model,About This Guide,Top -@anchor{gnat_ugn/getting_started_with_gnat getting-started-with-gnat}@anchor{8}@anchor{gnat_ugn/getting_started_with_gnat doc}@anchor{2f}@anchor{gnat_ugn/getting_started_with_gnat id1}@anchor{30} +@anchor{gnat_ugn/getting_started_with_gnat getting-started-with-gnat}@anchor{8}@anchor{gnat_ugn/getting_started_with_gnat doc}@anchor{14}@anchor{gnat_ugn/getting_started_with_gnat id1}@anchor{15} @chapter Getting Started with GNAT This chapter describes how to use GNAT's command line interface to build executable Ada programs. On most platforms a visually oriented Integrated Development Environment -is also available, the GNAT Programming Studio (GNAT Studio). +is also available: GNAT Studio. GNAT Studio offers a graphical "look and feel", support for development in other programming languages, comprehensive browsing features, and many other capabilities. -For information on GNAT Studio please refer to -@cite{Using the GNAT Programming Studio}. +For information on GNAT Studio please refer to the +@cite{GNAT Studio documentation}. @menu +* System Requirements:: * Running GNAT:: * Running a Simple Ada Program:: * Running a Program with Multiple Units:: -* Using the gnatmake Utility:: @end menu -@node Running GNAT,Running a Simple Ada Program,,Getting Started with GNAT -@anchor{gnat_ugn/getting_started_with_gnat running-gnat}@anchor{31}@anchor{gnat_ugn/getting_started_with_gnat id2}@anchor{32} +@node System Requirements,Running GNAT,,Getting Started with GNAT +@anchor{gnat_ugn/getting_started_with_gnat id2}@anchor{16}@anchor{gnat_ugn/getting_started_with_gnat system-requirements}@anchor{17} +@section System Requirements + + +Even though any machine can run the GNAT toolset and GNAT Studio IDE, in order +to get the best experience, we recommend using a machine with as many cores +as possible since all individual compilations can run in parallel. +A comfortable setup for a compiler server is a machine with 24 physical cores +or more, with at least 48 GB of memory (2 GB per core). + +For a desktop machine, a minimum of 4 cores is recommended (8 preferred), +with at least 2GB per core (so 8 to 16GB). + +In addition, for running and navigating sources in GNAT Studio smoothly, we +recommend at least 1.5 GB plus 3 GB of RAM per 1 million source line of code. +In other words, we recommend at least 3 GB for for 500K lines of code and +7.5 GB for 2 million lines of code. + +Note that using local and fast drives will also make a difference in terms of +build and link time. Network drives such as NFS, SMB, or worse, configuration +management filesystems (such as ClearCase dynamic views) should be avoided as +much as possible and will produce very degraded performance (typically 2 to 3 +times slower than on local fast drives). If such slow drives cannot be avoided +for accessing the source code, then you should at least configure your project +file so that the result of the compilation is stored on a drive local to the +machine performing the run. This can be achieved by setting the @code{Object_Dir} +project file attribute. + +@node Running GNAT,Running a Simple Ada Program,System Requirements,Getting Started with GNAT +@anchor{gnat_ugn/getting_started_with_gnat running-gnat}@anchor{18}@anchor{gnat_ugn/getting_started_with_gnat id3}@anchor{19} @section Running GNAT @@ -938,7 +826,7 @@ utility program that, given the name of the main program, automatically performs the necessary compilation, binding and linking steps. @node Running a Simple Ada Program,Running a Program with Multiple Units,Running GNAT,Getting Started with GNAT -@anchor{gnat_ugn/getting_started_with_gnat running-a-simple-ada-program}@anchor{33}@anchor{gnat_ugn/getting_started_with_gnat id3}@anchor{34} +@anchor{gnat_ugn/getting_started_with_gnat running-a-simple-ada-program}@anchor{1a}@anchor{gnat_ugn/getting_started_with_gnat id4}@anchor{1b} @section Running a Simple Ada Program @@ -967,12 +855,12 @@ extension is @code{ads} for a spec and @code{adb} for a body. You can override this default file naming convention by use of the special pragma @code{Source_File_Name} (for further information please -see @ref{35,,Using Other File Names}). +see @ref{1c,,Using Other File Names}). Alternatively, if you want to rename your files according to this default convention, which is probably more convenient if you will be using GNAT for all your compilations, then the @code{gnatchop} utility can be used to generate correctly-named source files -(see @ref{36,,Renaming Files with gnatchop}). +(see @ref{1d,,Renaming Files with gnatchop}). You can compile the program using the following command (@code{$} is used as the command prompt in the examples in this document): @@ -998,24 +886,12 @@ file corresponding to your Ada program. It also generates an 'Ada Library Information' file @code{hello.ali}, which contains additional information used to check that an Ada program is consistent. -To build an executable file, -use @code{gnatbind} to bind the program -and @code{gnatlink} to link it. The -argument to both @code{gnatbind} and @code{gnatlink} is the name of the -@code{ALI} file, but the default extension of @code{.ali} can -be omitted. This means that in the most common case, the argument -is simply the name of the main program: - -@example -$ gnatbind hello -$ gnatlink hello -@end example -A simpler method of carrying out these steps is to use @code{gnatmake}, -a master program that invokes all the required -compilation, binding and linking tools in the correct order. In particular, -@code{gnatmake} automatically recompiles any sources that have been -modified since they were last compiled, or sources that depend +To build an executable file, use either @code{gnatmake} or gprbuild with +the name of the main file: these tools are builders that will take care of +all the necessary build steps in the correct order. +In particular, these builders automatically recompile any sources that have +been modified since they were last compiled, or sources that depend on such modified sources, so that 'version skew' is avoided. @geindex Version skew (avoided by `@w{`}gnatmake`@w{`}) @@ -1042,8 +918,8 @@ Hello WORLD! appear in response to this command. -@node Running a Program with Multiple Units,Using the gnatmake Utility,Running a Simple Ada Program,Getting Started with GNAT -@anchor{gnat_ugn/getting_started_with_gnat id4}@anchor{37}@anchor{gnat_ugn/getting_started_with_gnat running-a-program-with-multiple-units}@anchor{38} +@node Running a Program with Multiple Units,,Running a Simple Ada Program,Getting Started with GNAT +@anchor{gnat_ugn/getting_started_with_gnat id5}@anchor{1e}@anchor{gnat_ugn/getting_started_with_gnat running-a-program-with-multiple-units}@anchor{1f} @section Running a Program with Multiple Units @@ -1096,17 +972,6 @@ body of package @code{Greetings} body of main program @end table -To build an executable version of -this program, we could use four separate steps to compile, bind, and link -the program, as follows: - -@example -$ gcc -c gmain.adb -$ gcc -c greetings.adb -$ gnatbind gmain -$ gnatlink gmain -@end example - Note that there is no required order of compilation when using GNAT. 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 @@ -1118,74 +983,17 @@ generation, then use the @code{-gnatc} switch: $ gcc -c greetings.ads -gnatc @end example -Although the compilation can be done in separate steps as in the -above example, in practice it is almost always more convenient -to use the @code{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 -commands can be achieved with a single one: +Although the compilation can be done in separate steps, in practice it is +almost always more convenient to use the @code{gnatmake} or @code{gprbuild} tools: @example $ gnatmake gmain.adb @end example -In the next section we discuss the advantages of using @code{gnatmake} in -more detail. - -@node Using the gnatmake Utility,,Running a Program with Multiple Units,Getting Started with GNAT -@anchor{gnat_ugn/getting_started_with_gnat using-the-gnatmake-utility}@anchor{39}@anchor{gnat_ugn/getting_started_with_gnat id5}@anchor{3a} -@section Using the @code{gnatmake} Utility - - -If you work on a program by compiling single components at a time using -@code{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 -units that depend on the units you have modified. -For example, in the preceding case, -if you edit @code{gmain.adb}, you only need to recompile that file. But if -you edit @code{greetings.ads}, you must recompile both -@code{greetings.adb} and @code{gmain.adb}, because both files contain -units that depend on @code{greetings.ads}. - -@code{gnatbind} will warn you if you forget one of these compilation -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 -error-prone to keep track of dependencies among units. -One approach to handle the dependency-bookkeeping is to use a -makefile. However, makefiles present maintenance problems of their own: -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 -error-prone process. - -The @code{gnatmake} utility takes care of these details automatically. -Invoke it using either one of the following forms: - -@example -$ gnatmake gmain.adb -$ gnatmake gmain -@end example - -The argument is the name of the file containing the main program; -you may omit the extension. @code{gnatmake} -examines the environment, automatically recompiles any files that need -recompiling, and binds and links the resulting set of object files, -generating the executable file, @code{gmain}. -In a large program, it -can be extremely helpful to use @code{gnatmake}, because working out by hand -what needs to be recompiled can be difficult. - -Note that @code{gnatmake} takes into account all the Ada rules that -establish dependencies among units. These include dependencies that result -from inlining subprogram bodies, and from -generic instantiation. Unlike some other -Ada make tools, @code{gnatmake} does not rely on the dependencies that were -found by the compiler on a previous compilation, which may possibly -be wrong when sources change. @code{gnatmake} determines the exact set of -dependencies from scratch each time it is run. - @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit @node The GNAT Compilation Model,Building Executable Programs with GNAT,Getting Started with GNAT,Top -@anchor{gnat_ugn/the_gnat_compilation_model doc}@anchor{3b}@anchor{gnat_ugn/the_gnat_compilation_model the-gnat-compilation-model}@anchor{9}@anchor{gnat_ugn/the_gnat_compilation_model id1}@anchor{3c} +@anchor{gnat_ugn/the_gnat_compilation_model doc}@anchor{20}@anchor{gnat_ugn/the_gnat_compilation_model the-gnat-compilation-model}@anchor{9}@anchor{gnat_ugn/the_gnat_compilation_model id1}@anchor{21} @chapter The GNAT Compilation Model @@ -1209,44 +1017,44 @@ Topics related to source file makeup and naming @itemize * @item -@ref{3d,,Source Representation} +@ref{22,,Source Representation} @item -@ref{3e,,Foreign Language Representation} +@ref{23,,Foreign Language Representation} @item -@ref{3f,,File Naming Topics and Utilities} +@ref{24,,File Naming Topics and Utilities} @end itemize @item -@ref{14,,Configuration Pragmas} +@ref{25,,Configuration Pragmas} @item -@ref{40,,Generating Object Files} +@ref{26,,Generating Object Files} @item -@ref{41,,Source Dependencies} +@ref{27,,Source Dependencies} @item -@ref{42,,The Ada Library Information Files} +@ref{28,,The Ada Library Information Files} @item -@ref{43,,Binding an Ada Program} +@ref{29,,Binding an Ada Program} @item -@ref{15,,GNAT and Libraries} +@ref{2a,,GNAT and Libraries} @item -@ref{16,,Conditional Compilation} +@ref{2b,,Conditional Compilation} @item -@ref{44,,Mixed Language Programming} +@ref{2c,,Mixed Language Programming} @item -@ref{45,,GNAT and Other Compilation Models} +@ref{2d,,GNAT and Other Compilation Models} @item -@ref{1a,,Using GNAT Files with External Tools} +@ref{2e,,Using GNAT Files with External Tools} @end itemize @menu @@ -1267,7 +1075,7 @@ Topics related to source file makeup and naming @end menu @node Source Representation,Foreign Language Representation,,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model source-representation}@anchor{3d}@anchor{gnat_ugn/the_gnat_compilation_model id2}@anchor{46} +@anchor{gnat_ugn/the_gnat_compilation_model source-representation}@anchor{22}@anchor{gnat_ugn/the_gnat_compilation_model id2}@anchor{2f} @section Source Representation @@ -1282,7 +1090,7 @@ Topics related to source file makeup and naming Ada source programs are represented in standard text files, using Latin-1 coding. Latin-1 is an 8-bit code that includes the familiar 7-bit ASCII set, plus additional characters used for -representing foreign languages (see @ref{3e,,Foreign Language Representation} +representing foreign languages (see @ref{23,,Foreign Language Representation} for support of non-USA character sets). The format effector characters are represented using their standard ASCII encodings, as follows: @@ -1393,13 +1201,13 @@ compilation units) is represented using a sequence of files. Similarly, you will place each subunit or child unit in a separate file. @node Foreign Language Representation,File Naming Topics and Utilities,Source Representation,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model foreign-language-representation}@anchor{3e}@anchor{gnat_ugn/the_gnat_compilation_model id3}@anchor{47} +@anchor{gnat_ugn/the_gnat_compilation_model foreign-language-representation}@anchor{23}@anchor{gnat_ugn/the_gnat_compilation_model id3}@anchor{30} @section Foreign Language Representation GNAT supports the standard character sets defined in Ada as well as several other non-standard character sets for use in localized versions -of the compiler (@ref{48,,Character Set Control}). +of the compiler (@ref{31,,Character Set Control}). @menu * Latin-1:: @@ -1410,7 +1218,7 @@ of the compiler (@ref{48,,Character Set Control}). @end menu @node Latin-1,Other 8-Bit Codes,,Foreign Language Representation -@anchor{gnat_ugn/the_gnat_compilation_model id4}@anchor{49}@anchor{gnat_ugn/the_gnat_compilation_model latin-1}@anchor{4a} +@anchor{gnat_ugn/the_gnat_compilation_model id4}@anchor{32}@anchor{gnat_ugn/the_gnat_compilation_model latin-1}@anchor{33} @subsection Latin-1 @@ -1433,7 +1241,7 @@ string literals. In addition, the extended characters that represent letters can be used in identifiers. @node Other 8-Bit Codes,Wide_Character Encodings,Latin-1,Foreign Language Representation -@anchor{gnat_ugn/the_gnat_compilation_model other-8-bit-codes}@anchor{4b}@anchor{gnat_ugn/the_gnat_compilation_model id5}@anchor{4c} +@anchor{gnat_ugn/the_gnat_compilation_model other-8-bit-codes}@anchor{34}@anchor{gnat_ugn/the_gnat_compilation_model id5}@anchor{35} @subsection Other 8-Bit Codes @@ -1550,7 +1358,7 @@ the GNAT compiler sources. You will need to obtain a full source release of GNAT to obtain this file. @node Wide_Character Encodings,Wide_Wide_Character Encodings,Other 8-Bit Codes,Foreign Language Representation -@anchor{gnat_ugn/the_gnat_compilation_model id6}@anchor{4d}@anchor{gnat_ugn/the_gnat_compilation_model wide-character-encodings}@anchor{4e} +@anchor{gnat_ugn/the_gnat_compilation_model id6}@anchor{36}@anchor{gnat_ugn/the_gnat_compilation_model wide-character-encodings}@anchor{37} @subsection Wide_Character Encodings @@ -1661,7 +1469,7 @@ use of the upper half of the Latin-1 set. @end cartouche @node Wide_Wide_Character Encodings,,Wide_Character Encodings,Foreign Language Representation -@anchor{gnat_ugn/the_gnat_compilation_model id7}@anchor{4f}@anchor{gnat_ugn/the_gnat_compilation_model wide-wide-character-encodings}@anchor{50} +@anchor{gnat_ugn/the_gnat_compilation_model id7}@anchor{38}@anchor{gnat_ugn/the_gnat_compilation_model wide-wide-character-encodings}@anchor{39} @subsection Wide_Wide_Character Encodings @@ -1713,7 +1521,7 @@ ACATS (Ada Conformity Assessment Test Suite) test suite distributions. @end table @node File Naming Topics and Utilities,Configuration Pragmas,Foreign Language Representation,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id8}@anchor{51}@anchor{gnat_ugn/the_gnat_compilation_model file-naming-topics-and-utilities}@anchor{3f} +@anchor{gnat_ugn/the_gnat_compilation_model id8}@anchor{3a}@anchor{gnat_ugn/the_gnat_compilation_model file-naming-topics-and-utilities}@anchor{24} @section File Naming Topics and Utilities @@ -1732,7 +1540,7 @@ source files correspond to the Ada compilation units that they contain. @end menu @node File Naming Rules,Using Other File Names,,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model file-naming-rules}@anchor{52}@anchor{gnat_ugn/the_gnat_compilation_model id9}@anchor{53} +@anchor{gnat_ugn/the_gnat_compilation_model file-naming-rules}@anchor{3b}@anchor{gnat_ugn/the_gnat_compilation_model id9}@anchor{3c} @subsection File Naming Rules @@ -1841,7 +1649,7 @@ unit names are long (for example, if child units or subunits are heavily nested). An option is available to shorten such long file names (called file name 'krunching'). This may be particularly useful when programs being developed with GNAT are to be used on operating systems -with limited file name lengths. @ref{54,,Using gnatkr}. +with limited file name lengths. @ref{3d,,Using gnatkr}. Of course, no file shortening algorithm can guarantee uniqueness over all possible unit names; if file name krunching is used, it is your @@ -1850,7 +1658,7 @@ can specify the exact file names that you want used, as described in the next section. Finally, if your Ada programs are migrating from a compiler with a different naming convention, you can use the gnatchop utility to produce source files that follow the GNAT naming conventions. -(For details see @ref{36,,Renaming Files with gnatchop}.) +(For details see @ref{1d,,Renaming Files with gnatchop}.) Note: in the case of Windows or Mac OS operating systems, case is not significant. So for example on Windows if the canonical name is @@ -1860,7 +1668,7 @@ if you want to use other than canonically cased file names on a Unix system, you need to follow the procedures described in the next section. @node Using Other File Names,Alternative File Naming Schemes,File Naming Rules,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model id10}@anchor{55}@anchor{gnat_ugn/the_gnat_compilation_model using-other-file-names}@anchor{35} +@anchor{gnat_ugn/the_gnat_compilation_model id10}@anchor{3e}@anchor{gnat_ugn/the_gnat_compilation_model using-other-file-names}@anchor{1c} @subsection Using Other File Names @@ -1898,7 +1706,7 @@ normally it will be placed in the @code{gnat.adc} file used to hold configuration pragmas that apply to a complete compilation environment. For more details on how the @code{gnat.adc} file is created and used -see @ref{56,,Handling of Configuration Pragmas}. +see @ref{3f,,Handling of Configuration Pragmas}. @geindex gnat.adc @@ -1920,7 +1728,7 @@ then it must be included in the @code{gnatmake} command, it may not be omitted. @node Alternative File Naming Schemes,Handling Arbitrary File Naming Conventions with gnatname,Using Other File Names,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model id11}@anchor{57}@anchor{gnat_ugn/the_gnat_compilation_model alternative-file-naming-schemes}@anchor{58} +@anchor{gnat_ugn/the_gnat_compilation_model id11}@anchor{40}@anchor{gnat_ugn/the_gnat_compilation_model alternative-file-naming-schemes}@anchor{41} @subsection Alternative File Naming Schemes @@ -2064,7 +1872,7 @@ pragma Source_File_Name @geindex gnatname @node Handling Arbitrary File Naming Conventions with gnatname,File Name Krunching with gnatkr,Alternative File Naming Schemes,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model handling-arbitrary-file-naming-conventions-with-gnatname}@anchor{59}@anchor{gnat_ugn/the_gnat_compilation_model id12}@anchor{5a} +@anchor{gnat_ugn/the_gnat_compilation_model handling-arbitrary-file-naming-conventions-with-gnatname}@anchor{42}@anchor{gnat_ugn/the_gnat_compilation_model id12}@anchor{43} @subsection Handling Arbitrary File Naming Conventions with @code{gnatname} @@ -2079,7 +1887,7 @@ pragma Source_File_Name @end menu @node Arbitrary File Naming Conventions,Running gnatname,,Handling Arbitrary File Naming Conventions with gnatname -@anchor{gnat_ugn/the_gnat_compilation_model arbitrary-file-naming-conventions}@anchor{5b}@anchor{gnat_ugn/the_gnat_compilation_model id13}@anchor{5c} +@anchor{gnat_ugn/the_gnat_compilation_model arbitrary-file-naming-conventions}@anchor{44}@anchor{gnat_ugn/the_gnat_compilation_model id13}@anchor{45} @subsubsection Arbitrary File Naming Conventions @@ -2090,11 +1898,11 @@ does not need additional information. When the source file names do not follow the standard GNAT default file naming conventions, the GNAT compiler must be given additional information through -a configuration pragmas file (@ref{14,,Configuration Pragmas}) +a configuration pragmas file (@ref{25,,Configuration Pragmas}) or a project file. When the non-standard file naming conventions are well-defined, a small number of pragmas @code{Source_File_Name} specifying a naming pattern -(@ref{58,,Alternative File Naming Schemes}) may be sufficient. However, +(@ref{41,,Alternative File Naming Schemes}) may be sufficient. However, if the file naming conventions are irregular or arbitrary, a number of pragma @code{Source_File_Name} for individual compilation units must be defined. @@ -2104,7 +1912,7 @@ GNAT provides a tool @code{gnatname} to generate the required pragmas for a set of files. @node Running gnatname,Switches for gnatname,Arbitrary File Naming Conventions,Handling Arbitrary File Naming Conventions with gnatname -@anchor{gnat_ugn/the_gnat_compilation_model running-gnatname}@anchor{5d}@anchor{gnat_ugn/the_gnat_compilation_model id14}@anchor{5e} +@anchor{gnat_ugn/the_gnat_compilation_model running-gnatname}@anchor{46}@anchor{gnat_ugn/the_gnat_compilation_model id14}@anchor{47} @subsubsection Running @code{gnatname} @@ -2155,7 +1963,7 @@ with pragmas @code{Source_File_Name} for each file that contains a valid Ada unit. @node Switches for gnatname,Examples of gnatname Usage,Running gnatname,Handling Arbitrary File Naming Conventions with gnatname -@anchor{gnat_ugn/the_gnat_compilation_model id15}@anchor{5f}@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatname}@anchor{60} +@anchor{gnat_ugn/the_gnat_compilation_model id15}@anchor{48}@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatname}@anchor{49} @subsubsection Switches for @code{gnatname} @@ -2338,7 +2146,7 @@ except those whose names end with @code{_nt.ada}. @end table @node Examples of gnatname Usage,,Switches for gnatname,Handling Arbitrary File Naming Conventions with gnatname -@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatname-usage}@anchor{61}@anchor{gnat_ugn/the_gnat_compilation_model id16}@anchor{62} +@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatname-usage}@anchor{4a}@anchor{gnat_ugn/the_gnat_compilation_model id16}@anchor{4b} @subsubsection Examples of @code{gnatname} Usage @@ -2364,7 +2172,7 @@ even in conjunction with one or several switches are used in this example. @node File Name Krunching with gnatkr,Renaming Files with gnatchop,Handling Arbitrary File Naming Conventions with gnatname,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model file-name-krunching-with-gnatkr}@anchor{63}@anchor{gnat_ugn/the_gnat_compilation_model id17}@anchor{64} +@anchor{gnat_ugn/the_gnat_compilation_model file-name-krunching-with-gnatkr}@anchor{4c}@anchor{gnat_ugn/the_gnat_compilation_model id17}@anchor{4d} @subsection File Name Krunching with @code{gnatkr} @@ -2385,7 +2193,7 @@ applying this shortening. @end menu @node About gnatkr,Using gnatkr,,File Name Krunching with gnatkr -@anchor{gnat_ugn/the_gnat_compilation_model id18}@anchor{65}@anchor{gnat_ugn/the_gnat_compilation_model about-gnatkr}@anchor{66} +@anchor{gnat_ugn/the_gnat_compilation_model id18}@anchor{4e}@anchor{gnat_ugn/the_gnat_compilation_model about-gnatkr}@anchor{4f} @subsubsection About @code{gnatkr} @@ -2423,7 +2231,7 @@ The @code{gnatkr} utility can be used to determine the krunched name for a given file, when krunched to a specified maximum length. @node Using gnatkr,Krunching Method,About gnatkr,File Name Krunching with gnatkr -@anchor{gnat_ugn/the_gnat_compilation_model id19}@anchor{67}@anchor{gnat_ugn/the_gnat_compilation_model using-gnatkr}@anchor{54} +@anchor{gnat_ugn/the_gnat_compilation_model id19}@anchor{50}@anchor{gnat_ugn/the_gnat_compilation_model using-gnatkr}@anchor{3d} @subsubsection Using @code{gnatkr} @@ -2460,7 +2268,7 @@ The output is the krunched name. The output has an extension only if the original argument was a file name with an extension. @node Krunching Method,Examples of gnatkr Usage,Using gnatkr,File Name Krunching with gnatkr -@anchor{gnat_ugn/the_gnat_compilation_model id20}@anchor{68}@anchor{gnat_ugn/the_gnat_compilation_model krunching-method}@anchor{69} +@anchor{gnat_ugn/the_gnat_compilation_model id20}@anchor{51}@anchor{gnat_ugn/the_gnat_compilation_model krunching-method}@anchor{52} @subsubsection Krunching Method @@ -2590,7 +2398,7 @@ program @code{gnatkr} is supplied for conveniently determining the krunched name of a file. @node Examples of gnatkr Usage,,Krunching Method,File Name Krunching with gnatkr -@anchor{gnat_ugn/the_gnat_compilation_model id21}@anchor{6a}@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatkr-usage}@anchor{6b} +@anchor{gnat_ugn/the_gnat_compilation_model id21}@anchor{53}@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatkr-usage}@anchor{54} @subsubsection Examples of @code{gnatkr} Usage @@ -2604,7 +2412,7 @@ $ gnatkr very_long_unit_name.ads/count=0 --> very_long_unit_name.ads @end example @node Renaming Files with gnatchop,,File Name Krunching with gnatkr,File Naming Topics and Utilities -@anchor{gnat_ugn/the_gnat_compilation_model id22}@anchor{6c}@anchor{gnat_ugn/the_gnat_compilation_model renaming-files-with-gnatchop}@anchor{36} +@anchor{gnat_ugn/the_gnat_compilation_model id22}@anchor{55}@anchor{gnat_ugn/the_gnat_compilation_model renaming-files-with-gnatchop}@anchor{1d} @subsection Renaming Files with @code{gnatchop} @@ -2624,7 +2432,7 @@ files to meet the standard GNAT default file naming conventions. @end menu @node Handling Files with Multiple Units,Operating gnatchop in Compilation Mode,,Renaming Files with gnatchop -@anchor{gnat_ugn/the_gnat_compilation_model id23}@anchor{6d}@anchor{gnat_ugn/the_gnat_compilation_model handling-files-with-multiple-units}@anchor{6e} +@anchor{gnat_ugn/the_gnat_compilation_model id23}@anchor{56}@anchor{gnat_ugn/the_gnat_compilation_model handling-files-with-multiple-units}@anchor{57} @subsubsection Handling Files with Multiple Units @@ -2637,7 +2445,7 @@ perhaps to maintain compatibility with some other Ada compilation system, you can use @code{gnatname} to generate or update your project files. Generated or modified project files can be processed by GNAT. -See @ref{59,,Handling Arbitrary File Naming Conventions with gnatname} +See @ref{42,,Handling Arbitrary File Naming Conventions with gnatname} for more details on how to use @cite{gnatname}. Alternatively, if you want to permanently restructure a set of 'foreign' @@ -2651,7 +2459,7 @@ will each start with a copy of this BOM, meaning that they can be compiled automatically in UTF-8 mode without needing to specify an explicit encoding. @node Operating gnatchop in Compilation Mode,Command Line for gnatchop,Handling Files with Multiple Units,Renaming Files with gnatchop -@anchor{gnat_ugn/the_gnat_compilation_model operating-gnatchop-in-compilation-mode}@anchor{6f}@anchor{gnat_ugn/the_gnat_compilation_model id24}@anchor{70} +@anchor{gnat_ugn/the_gnat_compilation_model operating-gnatchop-in-compilation-mode}@anchor{58}@anchor{gnat_ugn/the_gnat_compilation_model id24}@anchor{59} @subsubsection Operating gnatchop in Compilation Mode @@ -2684,7 +2492,7 @@ should apply to all subsequent compilations in the same compilation environment. Using GNAT, the current directory, possibly containing a @code{gnat.adc} file is the representation of a compilation environment. For more information on the -@code{gnat.adc} file, see @ref{56,,Handling of Configuration Pragmas}. +@code{gnat.adc} file, see @ref{3f,,Handling of Configuration Pragmas}. Second, in compilation mode, if @code{gnatchop} is given a file that starts with @@ -2711,7 +2519,7 @@ switch provides the required behavior, and is for example the mode in which GNAT processes the ACVC tests. @node Command Line for gnatchop,Switches for gnatchop,Operating gnatchop in Compilation Mode,Renaming Files with gnatchop -@anchor{gnat_ugn/the_gnat_compilation_model id25}@anchor{71}@anchor{gnat_ugn/the_gnat_compilation_model command-line-for-gnatchop}@anchor{72} +@anchor{gnat_ugn/the_gnat_compilation_model id25}@anchor{5a}@anchor{gnat_ugn/the_gnat_compilation_model command-line-for-gnatchop}@anchor{5b} @subsubsection Command Line for @code{gnatchop} @@ -2785,7 +2593,7 @@ no source files written @end example @node Switches for gnatchop,Examples of gnatchop Usage,Command Line for gnatchop,Renaming Files with gnatchop -@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatchop}@anchor{73}@anchor{gnat_ugn/the_gnat_compilation_model id26}@anchor{74} +@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatchop}@anchor{5c}@anchor{gnat_ugn/the_gnat_compilation_model id26}@anchor{5d} @subsubsection Switches for @code{gnatchop} @@ -2951,7 +2759,7 @@ no attempt is made to add the prefix to the GNAT parser executable. @end table @node Examples of gnatchop Usage,,Switches for gnatchop,Renaming Files with gnatchop -@anchor{gnat_ugn/the_gnat_compilation_model id27}@anchor{75}@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatchop-usage}@anchor{76} +@anchor{gnat_ugn/the_gnat_compilation_model id27}@anchor{5e}@anchor{gnat_ugn/the_gnat_compilation_model examples-of-gnatchop-usage}@anchor{5f} @subsubsection Examples of @code{gnatchop} Usage @@ -2992,7 +2800,7 @@ be the one that is output, and earlier duplicate occurrences for a given unit will be skipped. @node Configuration Pragmas,Generating Object Files,File Naming Topics and Utilities,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id28}@anchor{77}@anchor{gnat_ugn/the_gnat_compilation_model configuration-pragmas}@anchor{14} +@anchor{gnat_ugn/the_gnat_compilation_model id28}@anchor{60}@anchor{gnat_ugn/the_gnat_compilation_model configuration-pragmas}@anchor{25} @section Configuration Pragmas @@ -3103,7 +2911,7 @@ Wide_Character_Encoding @end menu @node Handling of Configuration Pragmas,The Configuration Pragmas Files,,Configuration Pragmas -@anchor{gnat_ugn/the_gnat_compilation_model id29}@anchor{78}@anchor{gnat_ugn/the_gnat_compilation_model handling-of-configuration-pragmas}@anchor{56} +@anchor{gnat_ugn/the_gnat_compilation_model id29}@anchor{61}@anchor{gnat_ugn/the_gnat_compilation_model handling-of-configuration-pragmas}@anchor{3f} @subsection Handling of Configuration Pragmas @@ -3114,7 +2922,7 @@ all compilations performed in a given compilation environment. GNAT also provides the @code{gnatchop} utility to provide an automatic way to handle configuration pragmas following the semantics for compilations (that is, files with multiple units), described in the RM. -See @ref{6f,,Operating gnatchop in Compilation Mode} for details. +See @ref{58,,Operating gnatchop in Compilation Mode} for details. However, for most purposes, it will be more convenient to edit the @code{gnat.adc} file that contains configuration pragmas directly, as described in the following section. @@ -3144,7 +2952,7 @@ relevant units). It can appear on a subunit only if it has previously appeared in the body of spec. @node The Configuration Pragmas Files,,Handling of Configuration Pragmas,Configuration Pragmas -@anchor{gnat_ugn/the_gnat_compilation_model the-configuration-pragmas-files}@anchor{79}@anchor{gnat_ugn/the_gnat_compilation_model id30}@anchor{7a} +@anchor{gnat_ugn/the_gnat_compilation_model the-configuration-pragmas-files}@anchor{62}@anchor{gnat_ugn/the_gnat_compilation_model id30}@anchor{63} @subsection The Configuration Pragmas Files @@ -3191,7 +2999,7 @@ project attributes. @c See :ref:`Specifying_Configuration_Pragmas` for more details. @node Generating Object Files,Source Dependencies,Configuration Pragmas,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model generating-object-files}@anchor{40}@anchor{gnat_ugn/the_gnat_compilation_model id31}@anchor{7b} +@anchor{gnat_ugn/the_gnat_compilation_model generating-object-files}@anchor{26}@anchor{gnat_ugn/the_gnat_compilation_model id31}@anchor{64} @section Generating Object Files @@ -3262,7 +3070,7 @@ part of the process of building a program. To compile a file in this checking mode, use the @code{-gnatc} switch. @node Source Dependencies,The Ada Library Information Files,Generating Object Files,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id32}@anchor{7c}@anchor{gnat_ugn/the_gnat_compilation_model source-dependencies}@anchor{41} +@anchor{gnat_ugn/the_gnat_compilation_model id32}@anchor{65}@anchor{gnat_ugn/the_gnat_compilation_model source-dependencies}@anchor{27} @section Source Dependencies @@ -3357,7 +3165,7 @@ recompilations is done automatically when one uses @code{gnatmake}. @end itemize @node The Ada Library Information Files,Binding an Ada Program,Source Dependencies,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id33}@anchor{7d}@anchor{gnat_ugn/the_gnat_compilation_model the-ada-library-information-files}@anchor{42} +@anchor{gnat_ugn/the_gnat_compilation_model id33}@anchor{66}@anchor{gnat_ugn/the_gnat_compilation_model the-ada-library-information-files}@anchor{28} @section The Ada Library Information Files @@ -3425,7 +3233,7 @@ see the source of the body of unit @code{Lib.Writ}, contained in file @code{lib-writ.adb} in the GNAT compiler sources. @node Binding an Ada Program,GNAT and Libraries,The Ada Library Information Files,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id34}@anchor{7e}@anchor{gnat_ugn/the_gnat_compilation_model binding-an-ada-program}@anchor{43} +@anchor{gnat_ugn/the_gnat_compilation_model id34}@anchor{67}@anchor{gnat_ugn/the_gnat_compilation_model binding-an-ada-program}@anchor{29} @section Binding an Ada Program @@ -3461,7 +3269,7 @@ using the object from the main program from the bind step as well as the object files for the Ada units of the program. @node GNAT and Libraries,Conditional Compilation,Binding an Ada Program,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model gnat-and-libraries}@anchor{15}@anchor{gnat_ugn/the_gnat_compilation_model id35}@anchor{7f} +@anchor{gnat_ugn/the_gnat_compilation_model gnat-and-libraries}@anchor{2a}@anchor{gnat_ugn/the_gnat_compilation_model id35}@anchor{68} @section GNAT and Libraries @@ -3481,7 +3289,7 @@ Project Manager facility (see the @emph{GNAT_Project_Manager} chapter of the @end menu @node Introduction to Libraries in GNAT,General Ada Libraries,,GNAT and Libraries -@anchor{gnat_ugn/the_gnat_compilation_model introduction-to-libraries-in-gnat}@anchor{80}@anchor{gnat_ugn/the_gnat_compilation_model id36}@anchor{81} +@anchor{gnat_ugn/the_gnat_compilation_model introduction-to-libraries-in-gnat}@anchor{69}@anchor{gnat_ugn/the_gnat_compilation_model id36}@anchor{6a} @subsection Introduction to Libraries in GNAT @@ -3508,7 +3316,7 @@ In the GNAT environment, a library has three types of components: Source files, @item -@code{ALI} files (see @ref{42,,The Ada Library Information Files}), and +@code{ALI} files (see @ref{28,,The Ada Library Information Files}), and @item Object files, an archive or a shared library. @@ -3520,7 +3328,7 @@ an external user to make use of the library. That is to say, the specs reflecting the library services along with all the units needed to compile those specs, which can include generic bodies or any body implementing an inlined routine. In the case of @emph{stand-alone libraries} those exposed -units are called @emph{interface units} (@ref{82,,Stand-alone Ada Libraries}). +units are called @emph{interface units} (@ref{6b,,Stand-alone Ada Libraries}). All compilation units comprising an application, including those in a library, need to be elaborated in an order partially defined by Ada's semantics. GNAT @@ -3531,7 +3339,7 @@ library elaboration routine is produced independently of the application(s) using the library. @node General Ada Libraries,Stand-alone Ada Libraries,Introduction to Libraries in GNAT,GNAT and Libraries -@anchor{gnat_ugn/the_gnat_compilation_model general-ada-libraries}@anchor{83}@anchor{gnat_ugn/the_gnat_compilation_model id37}@anchor{84} +@anchor{gnat_ugn/the_gnat_compilation_model general-ada-libraries}@anchor{6c}@anchor{gnat_ugn/the_gnat_compilation_model id37}@anchor{6d} @subsection General Ada Libraries @@ -3543,7 +3351,7 @@ using the library. @end menu @node Building a library,Installing a library,,General Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model building-a-library}@anchor{85}@anchor{gnat_ugn/the_gnat_compilation_model id38}@anchor{86} +@anchor{gnat_ugn/the_gnat_compilation_model building-a-library}@anchor{6e}@anchor{gnat_ugn/the_gnat_compilation_model id38}@anchor{6f} @subsubsection Building a library @@ -3625,7 +3433,7 @@ for this task. In special cases where this is not desired, the necessary steps are discussed below. There are various possibilities for compiling the units that make up the -library: for example with a Makefile (@ref{1f,,Using the GNU make Utility}) or +library: for example with a Makefile (@ref{70,,Using the GNU make Utility}) or with a conventional script. For simple libraries, it is also possible to create a dummy main program which depends upon all the packages that comprise the interface of the library. This dummy main program can then be given to @@ -3676,7 +3484,7 @@ or @code{lib@emph{xxx}.so} (or @code{lib@emph{xxx}.dll} on Windows) in order to be accessed by the directive @code{-l@emph{xxx}} at link time. @node Installing a library,Using a library,Building a library,General Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model installing-a-library}@anchor{87}@anchor{gnat_ugn/the_gnat_compilation_model id39}@anchor{88} +@anchor{gnat_ugn/the_gnat_compilation_model installing-a-library}@anchor{71}@anchor{gnat_ugn/the_gnat_compilation_model id39}@anchor{72} @subsubsection Installing a library @@ -3691,7 +3499,7 @@ process (see the @emph{Installing a Library with Project Files} section of the When project files are not an option, it is also possible, but not recommended, to install the library so that the sources needed to use the library are on the Ada source path and the ALI files & libraries be on the Ada Object path (see -@ref{89,,Search Paths and the Run-Time Library (RTL)}. Alternatively, the system +@ref{73,,Search Paths and the Run-Time Library (RTL)}. Alternatively, the system administrator can place general-purpose libraries in the default compiler paths, by specifying the libraries' location in the configuration files @code{ada_source_path} and @code{ada_object_path}. These configuration files @@ -3733,7 +3541,7 @@ library must be installed before the GNAT library if it redefines any part of it. @node Using a library,,Installing a library,General Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model using-a-library}@anchor{8a}@anchor{gnat_ugn/the_gnat_compilation_model id40}@anchor{8b} +@anchor{gnat_ugn/the_gnat_compilation_model using-a-library}@anchor{74}@anchor{gnat_ugn/the_gnat_compilation_model id40}@anchor{75} @subsubsection Using a library @@ -3772,8 +3580,8 @@ left to the tools having visibility over project dependence information. In order to use an Ada library manually, you need to make sure that this library is on both your source and object path -(see @ref{89,,Search Paths and the Run-Time Library (RTL)} -and @ref{8c,,Search Paths for gnatbind}). Furthermore, when the objects are grouped +(see @ref{73,,Search Paths and the Run-Time Library (RTL)} +and @ref{76,,Search Paths for gnatbind}). Furthermore, when the objects are grouped in an archive or a shared library, you need to specify the desired library at link time. @@ -3827,7 +3635,7 @@ in the directory @code{share/examples/gnat/plugins} within the GNAT install area. @node Stand-alone Ada Libraries,Rebuilding the GNAT Run-Time Library,General Ada Libraries,GNAT and Libraries -@anchor{gnat_ugn/the_gnat_compilation_model stand-alone-ada-libraries}@anchor{82}@anchor{gnat_ugn/the_gnat_compilation_model id41}@anchor{8d} +@anchor{gnat_ugn/the_gnat_compilation_model stand-alone-ada-libraries}@anchor{6b}@anchor{gnat_ugn/the_gnat_compilation_model id41}@anchor{77} @subsection Stand-alone Ada Libraries @@ -3842,7 +3650,7 @@ install area. @end menu @node Introduction to Stand-alone Libraries,Building a Stand-alone Library,,Stand-alone Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model introduction-to-stand-alone-libraries}@anchor{8e}@anchor{gnat_ugn/the_gnat_compilation_model id42}@anchor{8f} +@anchor{gnat_ugn/the_gnat_compilation_model introduction-to-stand-alone-libraries}@anchor{78}@anchor{gnat_ugn/the_gnat_compilation_model id42}@anchor{79} @subsubsection Introduction to Stand-alone Libraries @@ -3877,7 +3685,7 @@ Stand-alone libraries are also well suited to be used in an executable whose main routine is not written in Ada. @node Building a Stand-alone Library,Creating a Stand-alone Library to be used in a non-Ada context,Introduction to Stand-alone Libraries,Stand-alone Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model id43}@anchor{90}@anchor{gnat_ugn/the_gnat_compilation_model building-a-stand-alone-library}@anchor{91} +@anchor{gnat_ugn/the_gnat_compilation_model id43}@anchor{7a}@anchor{gnat_ugn/the_gnat_compilation_model building-a-stand-alone-library}@anchor{7b} @subsubsection Building a Stand-alone Library @@ -3996,10 +3804,10 @@ read-only. @end itemize Using SALs is not different from using other libraries -(see @ref{8a,,Using a library}). +(see @ref{74,,Using a library}). @node Creating a Stand-alone Library to be used in a non-Ada context,Restrictions in Stand-alone Libraries,Building a Stand-alone Library,Stand-alone Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model creating-a-stand-alone-library-to-be-used-in-a-non-ada-context}@anchor{92}@anchor{gnat_ugn/the_gnat_compilation_model id44}@anchor{93} +@anchor{gnat_ugn/the_gnat_compilation_model creating-a-stand-alone-library-to-be-used-in-a-non-ada-context}@anchor{7c}@anchor{gnat_ugn/the_gnat_compilation_model id44}@anchor{7d} @subsubsection Creating a Stand-alone Library to be used in a non-Ada context @@ -4084,7 +3892,7 @@ must be ensured at the application level using a specific operating system services like a mutex or a critical-section. @node Restrictions in Stand-alone Libraries,,Creating a Stand-alone Library to be used in a non-Ada context,Stand-alone Ada Libraries -@anchor{gnat_ugn/the_gnat_compilation_model id45}@anchor{94}@anchor{gnat_ugn/the_gnat_compilation_model restrictions-in-stand-alone-libraries}@anchor{95} +@anchor{gnat_ugn/the_gnat_compilation_model id45}@anchor{7e}@anchor{gnat_ugn/the_gnat_compilation_model restrictions-in-stand-alone-libraries}@anchor{7f} @subsubsection Restrictions in Stand-alone Libraries @@ -4130,7 +3938,7 @@ In practice these attributes are rarely used, so this is unlikely to be a consideration. @node Rebuilding the GNAT Run-Time Library,,Stand-alone Ada Libraries,GNAT and Libraries -@anchor{gnat_ugn/the_gnat_compilation_model id46}@anchor{96}@anchor{gnat_ugn/the_gnat_compilation_model rebuilding-the-gnat-run-time-library}@anchor{97} +@anchor{gnat_ugn/the_gnat_compilation_model id46}@anchor{80}@anchor{gnat_ugn/the_gnat_compilation_model rebuilding-the-gnat-run-time-library}@anchor{81} @subsection Rebuilding the GNAT Run-Time Library @@ -4166,7 +3974,7 @@ experiments or debugging, and is not supported. @geindex Conditional compilation @node Conditional Compilation,Mixed Language Programming,GNAT and Libraries,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id47}@anchor{98}@anchor{gnat_ugn/the_gnat_compilation_model conditional-compilation}@anchor{16} +@anchor{gnat_ugn/the_gnat_compilation_model id47}@anchor{82}@anchor{gnat_ugn/the_gnat_compilation_model conditional-compilation}@anchor{2b} @section Conditional Compilation @@ -4183,7 +3991,7 @@ gnatprep preprocessor utility. @end menu @node Modeling Conditional Compilation in Ada,Preprocessing with gnatprep,,Conditional Compilation -@anchor{gnat_ugn/the_gnat_compilation_model modeling-conditional-compilation-in-ada}@anchor{99}@anchor{gnat_ugn/the_gnat_compilation_model id48}@anchor{9a} +@anchor{gnat_ugn/the_gnat_compilation_model modeling-conditional-compilation-in-ada}@anchor{83}@anchor{gnat_ugn/the_gnat_compilation_model id48}@anchor{84} @subsection Modeling Conditional Compilation in Ada @@ -4234,7 +4042,7 @@ be achieved using Ada in general, and GNAT in particular. @end menu @node Use of Boolean Constants,Debugging - A Special Case,,Modeling Conditional Compilation in Ada -@anchor{gnat_ugn/the_gnat_compilation_model id49}@anchor{9b}@anchor{gnat_ugn/the_gnat_compilation_model use-of-boolean-constants}@anchor{9c} +@anchor{gnat_ugn/the_gnat_compilation_model id49}@anchor{85}@anchor{gnat_ugn/the_gnat_compilation_model use-of-boolean-constants}@anchor{86} @subsubsection Use of Boolean Constants @@ -4278,7 +4086,7 @@ Then any other unit requiring conditional compilation can do a @emph{with} of @code{Config} to make the constants visible. @node Debugging - A Special Case,Conditionalizing Declarations,Use of Boolean Constants,Modeling Conditional Compilation in Ada -@anchor{gnat_ugn/the_gnat_compilation_model debugging-a-special-case}@anchor{9d}@anchor{gnat_ugn/the_gnat_compilation_model id50}@anchor{9e} +@anchor{gnat_ugn/the_gnat_compilation_model debugging-a-special-case}@anchor{87}@anchor{gnat_ugn/the_gnat_compilation_model id50}@anchor{88} @subsubsection Debugging - A Special Case @@ -4391,7 +4199,7 @@ end if; @end example @node Conditionalizing Declarations,Use of Alternative Implementations,Debugging - A Special Case,Modeling Conditional Compilation in Ada -@anchor{gnat_ugn/the_gnat_compilation_model conditionalizing-declarations}@anchor{9f}@anchor{gnat_ugn/the_gnat_compilation_model id51}@anchor{a0} +@anchor{gnat_ugn/the_gnat_compilation_model conditionalizing-declarations}@anchor{89}@anchor{gnat_ugn/the_gnat_compilation_model id51}@anchor{8a} @subsubsection Conditionalizing Declarations @@ -4456,7 +4264,7 @@ constant was introduced as @code{System.Default_Bit_Order}, so you do not need to define this one yourself). @node Use of Alternative Implementations,Preprocessing,Conditionalizing Declarations,Modeling Conditional Compilation in Ada -@anchor{gnat_ugn/the_gnat_compilation_model use-of-alternative-implementations}@anchor{a1}@anchor{gnat_ugn/the_gnat_compilation_model id52}@anchor{a2} +@anchor{gnat_ugn/the_gnat_compilation_model use-of-alternative-implementations}@anchor{8b}@anchor{gnat_ugn/the_gnat_compilation_model id52}@anchor{8c} @subsubsection Use of Alternative Implementations @@ -4590,7 +4398,7 @@ The same idea can also be implemented using tagged types and dispatching calls. @node Preprocessing,,Use of Alternative Implementations,Modeling Conditional Compilation in Ada -@anchor{gnat_ugn/the_gnat_compilation_model preprocessing}@anchor{a3}@anchor{gnat_ugn/the_gnat_compilation_model id53}@anchor{a4} +@anchor{gnat_ugn/the_gnat_compilation_model preprocessing}@anchor{8d}@anchor{gnat_ugn/the_gnat_compilation_model id53}@anchor{8e} @subsubsection Preprocessing @@ -4613,7 +4421,7 @@ The preprocessor may be used in two separate modes. It can be used quite separately from the compiler, to generate a separate output source file that is then fed to the compiler as a separate step. This is the @code{gnatprep} utility, whose use is fully described in -@ref{17,,Preprocessing with gnatprep}. +@ref{8f,,Preprocessing with gnatprep}. The preprocessing language allows such constructs as @@ -4633,10 +4441,10 @@ often more convenient. In this approach the preprocessing is integrated into the compilation process. The compiler is given the preprocessor input which includes @code{#if} lines etc, and then the compiler carries out the preprocessing internally and processes the resulting output. -For more details on this approach, see @ref{18,,Integrated Preprocessing}. +For more details on this approach, see @ref{90,,Integrated Preprocessing}. @node Preprocessing with gnatprep,Integrated Preprocessing,Modeling Conditional Compilation in Ada,Conditional Compilation -@anchor{gnat_ugn/the_gnat_compilation_model id54}@anchor{a5}@anchor{gnat_ugn/the_gnat_compilation_model preprocessing-with-gnatprep}@anchor{17} +@anchor{gnat_ugn/the_gnat_compilation_model id54}@anchor{91}@anchor{gnat_ugn/the_gnat_compilation_model preprocessing-with-gnatprep}@anchor{8f} @subsection Preprocessing with @code{gnatprep} @@ -4649,7 +4457,7 @@ preprocessing. Although designed for use with GNAT, @code{gnatprep} does not depend on any special GNAT features. For further discussion of conditional compilation in general, see -@ref{16,,Conditional Compilation}. +@ref{2b,,Conditional Compilation}. @menu * Preprocessing Symbols:: @@ -4661,7 +4469,7 @@ For further discussion of conditional compilation in general, see @end menu @node Preprocessing Symbols,Using gnatprep,,Preprocessing with gnatprep -@anchor{gnat_ugn/the_gnat_compilation_model id55}@anchor{a6}@anchor{gnat_ugn/the_gnat_compilation_model preprocessing-symbols}@anchor{a7} +@anchor{gnat_ugn/the_gnat_compilation_model id55}@anchor{92}@anchor{gnat_ugn/the_gnat_compilation_model preprocessing-symbols}@anchor{93} @subsubsection Preprocessing Symbols @@ -4671,7 +4479,7 @@ normal Ada (case-insensitive) rules for its syntax, with the restriction that all characters need to be in the ASCII set (no accented letters). @node Using gnatprep,Switches for gnatprep,Preprocessing Symbols,Preprocessing with gnatprep -@anchor{gnat_ugn/the_gnat_compilation_model using-gnatprep}@anchor{a8}@anchor{gnat_ugn/the_gnat_compilation_model id56}@anchor{a9} +@anchor{gnat_ugn/the_gnat_compilation_model using-gnatprep}@anchor{94}@anchor{gnat_ugn/the_gnat_compilation_model id56}@anchor{95} @subsubsection Using @code{gnatprep} @@ -4729,7 +4537,7 @@ optional, and can be replaced by the use of the @code{-D} switch. @end itemize @node Switches for gnatprep,Form of Definitions File,Using gnatprep,Preprocessing with gnatprep -@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatprep}@anchor{aa}@anchor{gnat_ugn/the_gnat_compilation_model id57}@anchor{ab} +@anchor{gnat_ugn/the_gnat_compilation_model switches-for-gnatprep}@anchor{96}@anchor{gnat_ugn/the_gnat_compilation_model id57}@anchor{97} @subsubsection Switches for @code{gnatprep} @@ -4880,7 +4688,7 @@ deleted lines are completely removed from the output, unless -r is specified, in which case -b is assumed. @node Form of Definitions File,Form of Input Text for gnatprep,Switches for gnatprep,Preprocessing with gnatprep -@anchor{gnat_ugn/the_gnat_compilation_model form-of-definitions-file}@anchor{ac}@anchor{gnat_ugn/the_gnat_compilation_model id58}@anchor{ad} +@anchor{gnat_ugn/the_gnat_compilation_model form-of-definitions-file}@anchor{98}@anchor{gnat_ugn/the_gnat_compilation_model id58}@anchor{99} @subsubsection Form of Definitions File @@ -4910,7 +4718,7 @@ the usual @code{--}, and comments may be added to the definitions lines. @node Form of Input Text for gnatprep,,Form of Definitions File,Preprocessing with gnatprep -@anchor{gnat_ugn/the_gnat_compilation_model id59}@anchor{ae}@anchor{gnat_ugn/the_gnat_compilation_model form-of-input-text-for-gnatprep}@anchor{af} +@anchor{gnat_ugn/the_gnat_compilation_model id59}@anchor{9a}@anchor{gnat_ugn/the_gnat_compilation_model form-of-input-text-for-gnatprep}@anchor{9b} @subsubsection Form of Input Text for @code{gnatprep} @@ -5042,7 +4850,7 @@ Header : String := $XYZ; and then the substitution will occur as desired. @node Integrated Preprocessing,,Preprocessing with gnatprep,Conditional Compilation -@anchor{gnat_ugn/the_gnat_compilation_model id60}@anchor{b0}@anchor{gnat_ugn/the_gnat_compilation_model integrated-preprocessing}@anchor{18} +@anchor{gnat_ugn/the_gnat_compilation_model id60}@anchor{9c}@anchor{gnat_ugn/the_gnat_compilation_model integrated-preprocessing}@anchor{90} @subsection Integrated Preprocessing @@ -5103,7 +4911,7 @@ because @code{gnatmake} cannot compute the checksum of the source after preprocessing. The actual preprocessing function is described in detail in -@ref{17,,Preprocessing with gnatprep}. This section explains the switches +@ref{8f,,Preprocessing with gnatprep}. This section explains the switches that relate to integrated preprocessing. @geindex -gnatep (gcc) @@ -5202,7 +5010,7 @@ lines starting with the character '*'. After the file name or '*', an optional literal string specifies the name of the definition file to be used for preprocessing -(@ref{ac,,Form of Definitions File}). The definition files are found by the +(@ref{98,,Form of Definitions File}). The definition files are found by the compiler in one of the source directories. In some cases, when compiling a source in a directory other than the current directory, if the definition file is in the current directory, it may be necessary to add the current @@ -5294,7 +5102,7 @@ the output file will be @code{foo.adb.prep}. @end table @node Mixed Language Programming,GNAT and Other Compilation Models,Conditional Compilation,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model mixed-language-programming}@anchor{44}@anchor{gnat_ugn/the_gnat_compilation_model id61}@anchor{b1} +@anchor{gnat_ugn/the_gnat_compilation_model mixed-language-programming}@anchor{2c}@anchor{gnat_ugn/the_gnat_compilation_model id61}@anchor{9d} @section Mixed Language Programming @@ -5313,7 +5121,7 @@ with a focus on combining Ada with C or C++. @end menu @node Interfacing to C,Calling Conventions,,Mixed Language Programming -@anchor{gnat_ugn/the_gnat_compilation_model interfacing-to-c}@anchor{b2}@anchor{gnat_ugn/the_gnat_compilation_model id62}@anchor{b3} +@anchor{gnat_ugn/the_gnat_compilation_model interfacing-to-c}@anchor{9e}@anchor{gnat_ugn/the_gnat_compilation_model id62}@anchor{9f} @subsection Interfacing to C @@ -5424,7 +5232,7 @@ $ gnatmake my_main.adb -largs file1.o file2.o If the main program is in a language other than Ada, then you may have more than one entry point into the Ada subsystem. You must use a special binder option to generate callable routines that initialize and -finalize the Ada units (@ref{b4,,Binding with Non-Ada Main Programs}). +finalize the Ada units (@ref{a0,,Binding with Non-Ada Main Programs}). Calls to the initialization and finalization routines must be inserted in the main program, or some other appropriate point in the code. The call to initialize the Ada units must occur before the first Ada @@ -5540,7 +5348,7 @@ GNAT linker not to include the standard startup objects by passing the @code{-nostartfiles} switch to @code{gnatlink}. @node Calling Conventions,Building Mixed Ada and C++ Programs,Interfacing to C,Mixed Language Programming -@anchor{gnat_ugn/the_gnat_compilation_model calling-conventions}@anchor{b5}@anchor{gnat_ugn/the_gnat_compilation_model id63}@anchor{b6} +@anchor{gnat_ugn/the_gnat_compilation_model calling-conventions}@anchor{a1}@anchor{gnat_ugn/the_gnat_compilation_model id63}@anchor{a2} @subsection Calling Conventions @@ -5864,7 +5672,7 @@ identifier (for example in an @code{Import} pragma) with the same meaning as Fortran. @node Building Mixed Ada and C++ Programs,Generating Ada Bindings for C and C++ headers,Calling Conventions,Mixed Language Programming -@anchor{gnat_ugn/the_gnat_compilation_model id64}@anchor{b7}@anchor{gnat_ugn/the_gnat_compilation_model building-mixed-ada-and-c-programs}@anchor{b8} +@anchor{gnat_ugn/the_gnat_compilation_model id64}@anchor{a3}@anchor{gnat_ugn/the_gnat_compilation_model building-mixed-ada-and-c-programs}@anchor{a4} @subsection Building Mixed Ada and C++ Programs @@ -5882,7 +5690,7 @@ challenge. This section gives a few hints that should make this task easier. @end menu @node Interfacing to C++,Linking a Mixed C++ & Ada Program,,Building Mixed Ada and C++ Programs -@anchor{gnat_ugn/the_gnat_compilation_model id65}@anchor{b9}@anchor{gnat_ugn/the_gnat_compilation_model id66}@anchor{ba} +@anchor{gnat_ugn/the_gnat_compilation_model id65}@anchor{a5}@anchor{gnat_ugn/the_gnat_compilation_model id66}@anchor{a6} @subsubsection Interfacing to C++ @@ -5894,7 +5702,7 @@ Interfacing can be done at 3 levels: simple data, subprograms, and classes. In the first two cases, GNAT offers a specific @code{Convention C_Plus_Plus} (or @code{CPP}) that behaves exactly like @code{Convention C}. Usually, C++ mangles the names of subprograms. To generate proper mangled -names automatically, see @ref{19,,Generating Ada Bindings for C and C++ headers}). +names automatically, see @ref{a7,,Generating Ada Bindings for C and C++ headers}). This problem can also be addressed manually in two ways: @@ -5913,7 +5721,7 @@ Interfacing at the class level can be achieved by using the GNAT specific pragmas such as @code{CPP_Constructor}. See the @cite{GNAT_Reference_Manual} for additional information. @node Linking a Mixed C++ & Ada Program,A Simple Example,Interfacing to C++,Building Mixed Ada and C++ Programs -@anchor{gnat_ugn/the_gnat_compilation_model linking-a-mixed-c-ada-program}@anchor{bb}@anchor{gnat_ugn/the_gnat_compilation_model linking-a-mixed-c-and-ada-program}@anchor{bc} +@anchor{gnat_ugn/the_gnat_compilation_model linking-a-mixed-c-ada-program}@anchor{a8}@anchor{gnat_ugn/the_gnat_compilation_model linking-a-mixed-c-and-ada-program}@anchor{a9} @subsubsection Linking a Mixed C++ & Ada Program @@ -6028,7 +5836,7 @@ which has a large knowledge base and knows how to link Ada and C++ code together automatically in most cases. @node A Simple Example,Interfacing with C++ constructors,Linking a Mixed C++ & Ada Program,Building Mixed Ada and C++ Programs -@anchor{gnat_ugn/the_gnat_compilation_model id67}@anchor{bd}@anchor{gnat_ugn/the_gnat_compilation_model a-simple-example}@anchor{be} +@anchor{gnat_ugn/the_gnat_compilation_model id67}@anchor{aa}@anchor{gnat_ugn/the_gnat_compilation_model a-simple-example}@anchor{ab} @subsubsection A Simple Example @@ -6157,7 +5965,7 @@ end Simple_Cpp_Interface; @end example @node Interfacing with C++ constructors,Interfacing with C++ at the Class Level,A Simple Example,Building Mixed Ada and C++ Programs -@anchor{gnat_ugn/the_gnat_compilation_model id68}@anchor{bf}@anchor{gnat_ugn/the_gnat_compilation_model interfacing-with-c-constructors}@anchor{c0} +@anchor{gnat_ugn/the_gnat_compilation_model id68}@anchor{ac}@anchor{gnat_ugn/the_gnat_compilation_model interfacing-with-c-constructors}@anchor{ad} @subsubsection Interfacing with C++ constructors @@ -6184,8 +5992,8 @@ public: For this purpose we can write the following package spec (further information on how to build this spec is available in -@ref{c1,,Interfacing with C++ at the Class Level} and -@ref{19,,Generating Ada Bindings for C and C++ headers}). +@ref{ae,,Interfacing with C++ at the Class Level} and +@ref{a7,,Generating Ada Bindings for C and C++ headers}). @example with Interfaces.C; use Interfaces.C; @@ -6354,7 +6162,7 @@ by means of a limited aggregate. Any further action associated with the constructor can be placed inside the construct. @node Interfacing with C++ at the Class Level,,Interfacing with C++ constructors,Building Mixed Ada and C++ Programs -@anchor{gnat_ugn/the_gnat_compilation_model interfacing-with-c-at-the-class-level}@anchor{c1}@anchor{gnat_ugn/the_gnat_compilation_model id69}@anchor{c2} +@anchor{gnat_ugn/the_gnat_compilation_model interfacing-with-c-at-the-class-level}@anchor{ae}@anchor{gnat_ugn/the_gnat_compilation_model id69}@anchor{af} @subsubsection Interfacing with C++ at the Class Level @@ -6600,7 +6408,7 @@ int main () @end example @node Generating Ada Bindings for C and C++ headers,Generating C Headers for Ada Specifications,Building Mixed Ada and C++ Programs,Mixed Language Programming -@anchor{gnat_ugn/the_gnat_compilation_model id70}@anchor{c3}@anchor{gnat_ugn/the_gnat_compilation_model generating-ada-bindings-for-c-and-c-headers}@anchor{19} +@anchor{gnat_ugn/the_gnat_compilation_model id70}@anchor{b0}@anchor{gnat_ugn/the_gnat_compilation_model generating-ada-bindings-for-c-and-c-headers}@anchor{a7} @subsection Generating Ada Bindings for C and C++ headers @@ -6651,7 +6459,7 @@ even if your code is compiled using earlier versions of Ada (e.g. @code{-gnat95} @end menu @node Running the Binding Generator,Generating Bindings for C++ Headers,,Generating Ada Bindings for C and C++ headers -@anchor{gnat_ugn/the_gnat_compilation_model id71}@anchor{c4}@anchor{gnat_ugn/the_gnat_compilation_model running-the-binding-generator}@anchor{c5} +@anchor{gnat_ugn/the_gnat_compilation_model id71}@anchor{b1}@anchor{gnat_ugn/the_gnat_compilation_model running-the-binding-generator}@anchor{b2} @subsubsection Running the Binding Generator @@ -6745,7 +6553,7 @@ $ g++ -c -fdump-ada-spec readline1.h @end example @node Generating Bindings for C++ Headers,Switches,Running the Binding Generator,Generating Ada Bindings for C and C++ headers -@anchor{gnat_ugn/the_gnat_compilation_model id72}@anchor{c6}@anchor{gnat_ugn/the_gnat_compilation_model generating-bindings-for-c-headers}@anchor{c7} +@anchor{gnat_ugn/the_gnat_compilation_model id72}@anchor{b3}@anchor{gnat_ugn/the_gnat_compilation_model generating-bindings-for-c-headers}@anchor{b4} @subsubsection Generating Bindings for C++ Headers @@ -6846,7 +6654,7 @@ use Class_Dog; @end example @node Switches,,Generating Bindings for C++ Headers,Generating Ada Bindings for C and C++ headers -@anchor{gnat_ugn/the_gnat_compilation_model switches}@anchor{c8}@anchor{gnat_ugn/the_gnat_compilation_model switches-for-ada-binding-generation}@anchor{c9} +@anchor{gnat_ugn/the_gnat_compilation_model switches}@anchor{b5}@anchor{gnat_ugn/the_gnat_compilation_model switches-for-ada-binding-generation}@anchor{b6} @subsubsection Switches @@ -6894,7 +6702,7 @@ Extract comments from headers and generate Ada comments in the Ada spec files. @end table @node Generating C Headers for Ada Specifications,,Generating Ada Bindings for C and C++ headers,Mixed Language Programming -@anchor{gnat_ugn/the_gnat_compilation_model generating-c-headers-for-ada-specifications}@anchor{ca}@anchor{gnat_ugn/the_gnat_compilation_model id73}@anchor{cb} +@anchor{gnat_ugn/the_gnat_compilation_model generating-c-headers-for-ada-specifications}@anchor{b7}@anchor{gnat_ugn/the_gnat_compilation_model id73}@anchor{b8} @subsection Generating C Headers for Ada Specifications @@ -6937,7 +6745,7 @@ Subprogram declarations @end menu @node Running the C Header Generator,,,Generating C Headers for Ada Specifications -@anchor{gnat_ugn/the_gnat_compilation_model running-the-c-header-generator}@anchor{cc} +@anchor{gnat_ugn/the_gnat_compilation_model running-the-c-header-generator}@anchor{b9} @subsubsection Running the C Header Generator @@ -7005,7 +6813,7 @@ You can then @code{include} @code{pack1.h} from a C source file and use the type call subprograms, reference objects, and constants. @node GNAT and Other Compilation Models,Using GNAT Files with External Tools,Mixed Language Programming,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model id74}@anchor{cd}@anchor{gnat_ugn/the_gnat_compilation_model gnat-and-other-compilation-models}@anchor{45} +@anchor{gnat_ugn/the_gnat_compilation_model id74}@anchor{ba}@anchor{gnat_ugn/the_gnat_compilation_model gnat-and-other-compilation-models}@anchor{2d} @section GNAT and Other Compilation Models @@ -7021,7 +6829,7 @@ used for Ada 83. @end menu @node Comparison between GNAT and C/C++ Compilation Models,Comparison between GNAT and Conventional Ada Library Models,,GNAT and Other Compilation Models -@anchor{gnat_ugn/the_gnat_compilation_model comparison-between-gnat-and-c-c-compilation-models}@anchor{ce}@anchor{gnat_ugn/the_gnat_compilation_model id75}@anchor{cf} +@anchor{gnat_ugn/the_gnat_compilation_model comparison-between-gnat-and-c-c-compilation-models}@anchor{bb}@anchor{gnat_ugn/the_gnat_compilation_model id75}@anchor{bc} @subsection Comparison between GNAT and C/C++ Compilation Models @@ -7055,7 +6863,7 @@ elaboration, a C++ compiler would simply construct a program that malfunctioned at run time. @node Comparison between GNAT and Conventional Ada Library Models,,Comparison between GNAT and C/C++ Compilation Models,GNAT and Other Compilation Models -@anchor{gnat_ugn/the_gnat_compilation_model comparison-between-gnat-and-conventional-ada-library-models}@anchor{d0}@anchor{gnat_ugn/the_gnat_compilation_model id76}@anchor{d1} +@anchor{gnat_ugn/the_gnat_compilation_model comparison-between-gnat-and-conventional-ada-library-models}@anchor{bd}@anchor{gnat_ugn/the_gnat_compilation_model id76}@anchor{be} @subsection Comparison between GNAT and Conventional Ada Library Models @@ -7123,7 +6931,7 @@ of rules saying what source files must be present when a file is compiled. @node Using GNAT Files with External Tools,,GNAT and Other Compilation Models,The GNAT Compilation Model -@anchor{gnat_ugn/the_gnat_compilation_model using-gnat-files-with-external-tools}@anchor{1a}@anchor{gnat_ugn/the_gnat_compilation_model id77}@anchor{d2} +@anchor{gnat_ugn/the_gnat_compilation_model using-gnat-files-with-external-tools}@anchor{2e}@anchor{gnat_ugn/the_gnat_compilation_model id77}@anchor{bf} @section Using GNAT Files with External Tools @@ -7137,7 +6945,7 @@ used with tools designed for other languages. @end menu @node Using Other Utility Programs with GNAT,The External Symbol Naming Scheme of GNAT,,Using GNAT Files with External Tools -@anchor{gnat_ugn/the_gnat_compilation_model using-other-utility-programs-with-gnat}@anchor{d3}@anchor{gnat_ugn/the_gnat_compilation_model id78}@anchor{d4} +@anchor{gnat_ugn/the_gnat_compilation_model using-other-utility-programs-with-gnat}@anchor{c0}@anchor{gnat_ugn/the_gnat_compilation_model id78}@anchor{c1} @subsection Using Other Utility Programs with GNAT @@ -7152,7 +6960,7 @@ gprof (a profiling program), gdb (the FSF debugger), and utilities such as Purify. @node The External Symbol Naming Scheme of GNAT,,Using Other Utility Programs with GNAT,Using GNAT Files with External Tools -@anchor{gnat_ugn/the_gnat_compilation_model the-external-symbol-naming-scheme-of-gnat}@anchor{d5}@anchor{gnat_ugn/the_gnat_compilation_model id79}@anchor{d6} +@anchor{gnat_ugn/the_gnat_compilation_model the-external-symbol-naming-scheme-of-gnat}@anchor{c2}@anchor{gnat_ugn/the_gnat_compilation_model id79}@anchor{c3} @subsection The External Symbol Naming Scheme of GNAT @@ -7211,23 +7019,23 @@ the external name of this procedure will be @code{_ada_hello}. @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit @node Building Executable Programs with GNAT,GNAT Utility Programs,The GNAT Compilation Model,Top -@anchor{gnat_ugn/building_executable_programs_with_gnat building-executable-programs-with-gnat}@anchor{a}@anchor{gnat_ugn/building_executable_programs_with_gnat doc}@anchor{d7}@anchor{gnat_ugn/building_executable_programs_with_gnat id1}@anchor{d8} +@anchor{gnat_ugn/building_executable_programs_with_gnat building-executable-programs-with-gnat}@anchor{a}@anchor{gnat_ugn/building_executable_programs_with_gnat doc}@anchor{c4}@anchor{gnat_ugn/building_executable_programs_with_gnat id1}@anchor{c5} @chapter Building Executable Programs with GNAT This chapter describes first the gnatmake tool -(@ref{1b,,Building with gnatmake}), +(@ref{c6,,Building with gnatmake}), which automatically determines the set of sources needed by an Ada compilation unit and executes the necessary (re)compilations, binding and linking. It also explains how to use each tool individually: the -compiler (gcc, see @ref{1c,,Compiling with gcc}), -binder (gnatbind, see @ref{1d,,Binding with gnatbind}), -and linker (gnatlink, see @ref{1e,,Linking with gnatlink}) +compiler (gcc, see @ref{c7,,Compiling with gcc}), +binder (gnatbind, see @ref{c8,,Binding with gnatbind}), +and linker (gnatlink, see @ref{c9,,Linking with gnatlink}) to build executable programs. Finally, this chapter provides examples of how to make use of the general GNU make mechanism -in a GNAT context (see @ref{1f,,Using the GNU make Utility}). +in a GNAT context (see @ref{70,,Using the GNU make Utility}). @menu @@ -7242,7 +7050,7 @@ in a GNAT context (see @ref{1f,,Using the GNU make Utility}). @end menu @node Building with gnatmake,Compiling with gcc,,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat the-gnat-make-program-gnatmake}@anchor{1b}@anchor{gnat_ugn/building_executable_programs_with_gnat building-with-gnatmake}@anchor{d9} +@anchor{gnat_ugn/building_executable_programs_with_gnat the-gnat-make-program-gnatmake}@anchor{c6}@anchor{gnat_ugn/building_executable_programs_with_gnat building-with-gnatmake}@anchor{ca} @section Building with @code{gnatmake} @@ -7306,7 +7114,7 @@ to @code{gnatmake}. @end menu @node Running gnatmake,Switches for gnatmake,,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatmake}@anchor{da}@anchor{gnat_ugn/building_executable_programs_with_gnat id2}@anchor{db} +@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatmake}@anchor{cb}@anchor{gnat_ugn/building_executable_programs_with_gnat id2}@anchor{cc} @subsection Running @code{gnatmake} @@ -7334,14 +7142,14 @@ be searched for in the specified directory only. Otherwise, the input source file will first be searched in the directory where @code{gnatmake} was invoked and if it is not found, it will be search on the source path of the compiler as described in -@ref{89,,Search Paths and the Run-Time Library (RTL)}. +@ref{73,,Search Paths and the Run-Time Library (RTL)}. All @code{gnatmake} output (except when you specify @code{-M}) is sent to @code{stderr}. The output produced by the @code{-M} switch is sent to @code{stdout}. @node Switches for gnatmake,Mode Switches for gnatmake,Running gnatmake,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatmake}@anchor{dc}@anchor{gnat_ugn/building_executable_programs_with_gnat id3}@anchor{dd} +@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatmake}@anchor{cd}@anchor{gnat_ugn/building_executable_programs_with_gnat id3}@anchor{ce} @subsection Switches for @code{gnatmake} @@ -7715,7 +7523,7 @@ then instead object files and ALI files that already exist are overwritten in place. This means that once a large project is organized into separate directories in the desired manner, then @code{gnatmake} will automatically maintain and update this organization. If no ALI files are found on the -Ada object path (see @ref{89,,Search Paths and the Run-Time Library (RTL)}), +Ada object path (see @ref{73,,Search Paths and the Run-Time Library (RTL)}), the new object and ALI files are created in the directory containing the source being compiled. If another organization is desired, where objects and sources are kept in different directories, @@ -7981,7 +7789,7 @@ Verbosity level High. Equivalent to -v. @item @code{-vP@emph{x}} Indicate the verbosity of the parsing of GNAT project files. -See @ref{de,,Switches Related to Project Files}. +See @ref{cf,,Switches Related to Project Files}. @end table @geindex -x (gnatmake) @@ -8005,7 +7813,7 @@ command line need to be sources of a project file. Indicate that external variable @code{name} has the value @code{value}. The Project Manager will use this value for occurrences of @code{external(name)} when parsing the project file. -@ref{de,,Switches Related to Project Files}. +@ref{cf,,Switches Related to Project Files}. @end table @geindex -z (gnatmake) @@ -8039,7 +7847,7 @@ is passed to @code{gcc} (e.g., @code{-O}, @code{-gnato,} etc.) When looking for source files also look in directory @code{dir}. The order in which source files search is undertaken is -described in @ref{89,,Search Paths and the Run-Time Library (RTL)}. +described in @ref{73,,Search Paths and the Run-Time Library (RTL)}. @end table @geindex -aL (gnatmake) @@ -8071,7 +7879,7 @@ ALI files. When searching for library and object files, look in directory @code{dir}. The order in which library files are searched is described in -@ref{8c,,Search Paths for gnatbind}. +@ref{76,,Search Paths for gnatbind}. @end table @geindex Search paths @@ -8176,7 +7984,7 @@ The selected path is handled like a normal RTS path. @end table @node Mode Switches for gnatmake,Notes on the Command Line,Switches for gnatmake,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat id4}@anchor{df}@anchor{gnat_ugn/building_executable_programs_with_gnat mode-switches-for-gnatmake}@anchor{e0} +@anchor{gnat_ugn/building_executable_programs_with_gnat id4}@anchor{d0}@anchor{gnat_ugn/building_executable_programs_with_gnat mode-switches-for-gnatmake}@anchor{d1} @subsection Mode Switches for @code{gnatmake} @@ -8236,7 +8044,7 @@ or @code{-largs}. @end table @node Notes on the Command Line,How gnatmake Works,Mode Switches for gnatmake,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat id5}@anchor{e1}@anchor{gnat_ugn/building_executable_programs_with_gnat notes-on-the-command-line}@anchor{e2} +@anchor{gnat_ugn/building_executable_programs_with_gnat id5}@anchor{d2}@anchor{gnat_ugn/building_executable_programs_with_gnat notes-on-the-command-line}@anchor{d3} @subsection Notes on the Command Line @@ -8306,7 +8114,7 @@ that the debugging information may be out of date. @end itemize @node How gnatmake Works,Examples of gnatmake Usage,Notes on the Command Line,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat id6}@anchor{e3}@anchor{gnat_ugn/building_executable_programs_with_gnat how-gnatmake-works}@anchor{e4} +@anchor{gnat_ugn/building_executable_programs_with_gnat id6}@anchor{d4}@anchor{gnat_ugn/building_executable_programs_with_gnat how-gnatmake-works}@anchor{d5} @subsection How @code{gnatmake} Works @@ -8346,14 +8154,14 @@ When invoking @code{gnatmake} with several @code{file_names}, if a unit is imported by several of the executables, it will be recompiled at most once. Note: when using non-standard naming conventions -(@ref{35,,Using Other File Names}), changing through a configuration pragmas +(@ref{1c,,Using Other File Names}), changing through a configuration pragmas file the version of a source and invoking @code{gnatmake} to recompile may have no effect, if the previous version of the source is still accessible by @code{gnatmake}. It may be necessary to use the switch -f. @node Examples of gnatmake Usage,,How gnatmake Works,Building with gnatmake -@anchor{gnat_ugn/building_executable_programs_with_gnat examples-of-gnatmake-usage}@anchor{e5}@anchor{gnat_ugn/building_executable_programs_with_gnat id7}@anchor{e6} +@anchor{gnat_ugn/building_executable_programs_with_gnat examples-of-gnatmake-usage}@anchor{d6}@anchor{gnat_ugn/building_executable_programs_with_gnat id7}@anchor{d7} @subsection Examples of @code{gnatmake} Usage @@ -8385,7 +8193,7 @@ displaying commands it is executing. @end table @node Compiling with gcc,Compiler Switches,Building with gnatmake,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-with-gcc}@anchor{1c}@anchor{gnat_ugn/building_executable_programs_with_gnat id8}@anchor{e7} +@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-with-gcc}@anchor{c7}@anchor{gnat_ugn/building_executable_programs_with_gnat id8}@anchor{d8} @section Compiling with @code{gcc} @@ -8402,7 +8210,7 @@ that can be used to control the behavior of the compiler. @end menu @node Compiling Programs,Search Paths and the Run-Time Library RTL,,Compiling with gcc -@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-programs}@anchor{e8}@anchor{gnat_ugn/building_executable_programs_with_gnat id9}@anchor{e9} +@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-programs}@anchor{d9}@anchor{gnat_ugn/building_executable_programs_with_gnat id9}@anchor{da} @subsection Compiling Programs @@ -8515,11 +8323,11 @@ calls @code{gnat1} (the Ada compiler) twice to compile @code{x.adb} and The compiler generates two object files @code{x.o} and @code{y.o} and the two ALI files @code{x.ali} and @code{y.ali}. -Any switches apply to all the files listed, see @ref{ea,,Compiler Switches} for a +Any switches apply to all the files listed, see @ref{db,,Compiler Switches} for a list of available @code{gcc} switches. @node Search Paths and the Run-Time Library RTL,Order of Compilation Issues,Compiling Programs,Compiling with gcc -@anchor{gnat_ugn/building_executable_programs_with_gnat id10}@anchor{eb}@anchor{gnat_ugn/building_executable_programs_with_gnat search-paths-and-the-run-time-library-rtl}@anchor{89} +@anchor{gnat_ugn/building_executable_programs_with_gnat id10}@anchor{dc}@anchor{gnat_ugn/building_executable_programs_with_gnat search-paths-and-the-run-time-library-rtl}@anchor{73} @subsection Search Paths and the Run-Time Library (RTL) @@ -8576,7 +8384,7 @@ names separated by colons (semicolons when working with the NT version). The content of the @code{ada_source_path} file which is part of the GNAT installation tree and is used to store standard libraries such as the GNAT Run Time Library (RTL) source files. -@ref{87,,Installing a library} +@ref{71,,Installing a library} @end itemize Specifying the switch @code{-I-} @@ -8618,7 +8426,7 @@ in compiling sources from multiple directories. This can make development environments much more flexible. @node Order of Compilation Issues,Examples,Search Paths and the Run-Time Library RTL,Compiling with gcc -@anchor{gnat_ugn/building_executable_programs_with_gnat id11}@anchor{ec}@anchor{gnat_ugn/building_executable_programs_with_gnat order-of-compilation-issues}@anchor{ed} +@anchor{gnat_ugn/building_executable_programs_with_gnat id11}@anchor{dd}@anchor{gnat_ugn/building_executable_programs_with_gnat order-of-compilation-issues}@anchor{de} @subsection Order of Compilation Issues @@ -8646,7 +8454,7 @@ source files on which it depends. @item There is no library as such, apart from the ALI files -(@ref{42,,The Ada Library Information Files}, for information on the format +(@ref{28,,The Ada Library Information Files}, for information on the format of these files). For now we find it convenient to create separate ALI files, but eventually the information therein may be incorporated into the object file directly. @@ -8659,7 +8467,7 @@ described above), or you will receive a fatal error message. @end itemize @node Examples,,Order of Compilation Issues,Compiling with gcc -@anchor{gnat_ugn/building_executable_programs_with_gnat id12}@anchor{ee}@anchor{gnat_ugn/building_executable_programs_with_gnat examples}@anchor{ef} +@anchor{gnat_ugn/building_executable_programs_with_gnat id12}@anchor{df}@anchor{gnat_ugn/building_executable_programs_with_gnat examples}@anchor{e0} @subsection Examples @@ -8687,7 +8495,7 @@ Compile the subunit in file @code{abc-def.adb} in semantic-checking-only mode. @node Compiler Switches,Linker Switches,Compiling with gcc,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat compiler-switches}@anchor{f0}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gcc}@anchor{ea} +@anchor{gnat_ugn/building_executable_programs_with_gnat compiler-switches}@anchor{e1}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gcc}@anchor{db} @section Compiler Switches @@ -8726,7 +8534,7 @@ compilation units. @end menu @node Alphabetical List of All Switches,Output and Error Message Control,,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id13}@anchor{f1}@anchor{gnat_ugn/building_executable_programs_with_gnat alphabetical-list-of-all-switches}@anchor{f2} +@anchor{gnat_ugn/building_executable_programs_with_gnat id13}@anchor{e2}@anchor{gnat_ugn/building_executable_programs_with_gnat alphabetical-list-of-all-switches}@anchor{e3} @subsection Alphabetical List of All Switches @@ -8911,7 +8719,7 @@ and thus producing inferior code. Causes the compiler to avoid assumptions regarding non-aliasing of objects of different types. See -@ref{f3,,Optimization and Strict Aliasing} for details. +@ref{e4,,Optimization and Strict Aliasing} for details. @end table @geindex -fno-strict-overflow (gcc) @@ -8937,7 +8745,7 @@ for very peculiar cases of low-level programming. @item @code{-fstack-check} Activates stack checking. -See @ref{f4,,Stack Overflow Checking} for details. +See @ref{e5,,Stack Overflow Checking} for details. @end table @geindex -fstack-usage (gcc) @@ -8948,7 +8756,7 @@ See @ref{f4,,Stack Overflow Checking} for details. @item @code{-fstack-usage} Makes the compiler output stack usage information for the program, on a -per-subprogram basis. See @ref{f5,,Static Stack Usage Analysis} for details. +per-subprogram basis. See @ref{e6,,Static Stack Usage Analysis} for details. @end table @geindex -g (gcc) @@ -9078,7 +8886,7 @@ Generate brief messages to @code{stderr} even if verbose mode set. @item @code{-gnatB} Assume no invalid (bad) values except for 'Valid attribute use -(@ref{f6,,Validity Checking}). +(@ref{e7,,Validity Checking}). @end table @geindex -gnatc (gcc) @@ -9191,7 +8999,7 @@ not share the memory location of @code{Obj}. Specify a configuration pragma file (the equal sign is optional) -(@ref{79,,The Configuration Pragmas Files}). +(@ref{62,,The Configuration Pragmas Files}). @end table @geindex -gnateC (gcc) @@ -9224,7 +9032,7 @@ Disable atomic synchronization @item @code{-gnateDsymbol[=@emph{value}]} Defines a symbol, associated with @code{value}, for preprocessing. -(@ref{18,,Integrated Preprocessing}). +(@ref{90,,Integrated Preprocessing}). @end table @geindex -gnateE (gcc) @@ -9273,7 +9081,7 @@ for unconstrained predefined types. See description of pragma The @code{-gnatc} switch must always be specified before this switch, e.g. @code{-gnatceg}. Generate a C header from the Ada input file. See -@ref{ca,,Generating C Headers for Ada Specifications} for more +@ref{b7,,Generating C Headers for Ada Specifications} for more information. @end quotation @@ -9347,7 +9155,7 @@ This switch turns off the info messages about implicit elaboration pragmas. Specify a mapping file (the equal sign is optional) -(@ref{f7,,Units to Sources Mapping Files}). +(@ref{e8,,Units to Sources Mapping Files}). @end table @geindex -gnatep (gcc) @@ -9359,7 +9167,7 @@ Specify a mapping file Specify a preprocessing data file (the equal sign is optional) -(@ref{18,,Integrated Preprocessing}). +(@ref{90,,Integrated Preprocessing}). @end table @geindex -gnateP (gcc) @@ -9557,7 +9365,7 @@ support this switch. @item @code{-gnateV} Check that all actual parameters of a subprogram call are valid according to -the rules of validity checking (@ref{f6,,Validity Checking}). +the rules of validity checking (@ref{e7,,Validity Checking}). @end table @geindex -gnateY (gcc) @@ -9661,7 +9469,7 @@ For further details see @ref{f,,Elaboration Order Handling in GNAT}. Identifier character set (@code{c} = 1/2/3/4/8/9/p/f/n/w). For details of the possible selections for @code{c}, -see @ref{48,,Character Set Control}. +see @ref{31,,Character Set Control}. @end table @geindex -gnatI (gcc) @@ -9910,7 +9718,7 @@ overflow checking is enabled. Note that division by zero is a separate check that is not controlled by this switch (divide-by-zero checking is on by default). -See also @ref{f8,,Specifying the Desired Mode}. +See also @ref{e9,,Specifying the Desired Mode}. @end table @geindex -gnatp (gcc) @@ -9920,7 +9728,7 @@ See also @ref{f8,,Specifying the Desired Mode}. @item @code{-gnatp} -Suppress all checks. See @ref{f9,,Run-Time Checks} for details. This switch +Suppress all checks. See @ref{ea,,Run-Time Checks} for details. This switch has no effect if cancelled by a subsequent @code{-gnat-p} switch. @end table @@ -10059,7 +9867,7 @@ Verbose mode. Full error output with source lines to @code{stdout}. @item @code{-gnatV} -Control level of validity checking (@ref{f6,,Validity Checking}). +Control level of validity checking (@ref{e7,,Validity Checking}). @end table @geindex -gnatw (gcc) @@ -10072,7 +9880,7 @@ Control level of validity checking (@ref{f6,,Validity Checking}). Warning mode where @code{xxx} is a string of option letters that denotes the exact warnings that -are enabled or disabled (@ref{fa,,Warning Message Control}). +are enabled or disabled (@ref{eb,,Warning Message Control}). @end table @geindex -gnatW (gcc) @@ -10113,7 +9921,7 @@ Enable GNAT implementation extensions and latest Ada version. @item @code{-gnaty} -Enable built-in style checks (@ref{fb,,Style Checking}). +Enable built-in style checks (@ref{ec,,Style Checking}). @end table @geindex -gnatz (gcc) @@ -10138,7 +9946,7 @@ Distribution stub generation and compilation Direct GNAT to search the @code{dir} directory for source files needed by the current compilation -(see @ref{89,,Search Paths and the Run-Time Library (RTL)}). +(see @ref{73,,Search Paths and the Run-Time Library (RTL)}). @end table @geindex -I- (gcc) @@ -10152,7 +9960,7 @@ the current compilation Except for the source file named in the command line, do not look for source files in the directory containing the source file named in the command line -(see @ref{89,,Search Paths and the Run-Time Library (RTL)}). +(see @ref{73,,Search Paths and the Run-Time Library (RTL)}). @end table @geindex -o (gcc) @@ -10256,7 +10064,7 @@ Optimize space usage @end multitable -See also @ref{fc,,Optimization Levels}. +See also @ref{ed,,Optimization Levels}. @end table @geindex -pass-exit-codes (gcc) @@ -10278,7 +10086,7 @@ exit status. @item @code{--RTS=@emph{rts-path}} Specifies the default location of the run-time library. Same meaning as the -equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). +equivalent @code{gnatmake} flag (@ref{cd,,Switches for gnatmake}). @end table @geindex -S (gcc) @@ -10404,7 +10212,7 @@ as warning mode modifiers (see description of @code{-gnatw}). @item Once a 'V' appears in the string (that is a use of the @code{-gnatV} switch), then all further characters in the switch are interpreted -as validity checking options (@ref{f6,,Validity Checking}). +as validity checking options (@ref{e7,,Validity Checking}). @item Option 'em', 'ec', 'ep', 'l=' and 'R' must be the last options in @@ -10412,7 +10220,7 @@ a combined list of options. @end itemize @node Output and Error Message Control,Warning Message Control,Alphabetical List of All Switches,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id14}@anchor{fd}@anchor{gnat_ugn/building_executable_programs_with_gnat output-and-error-message-control}@anchor{fe} +@anchor{gnat_ugn/building_executable_programs_with_gnat id14}@anchor{ee}@anchor{gnat_ugn/building_executable_programs_with_gnat output-and-error-message-control}@anchor{ef} @subsection Output and Error Message Control @@ -10707,7 +10515,7 @@ since ALI files are never generated if @code{-gnats} is set. @end table @node Warning Message Control,Debugging and Assertion Control,Output and Error Message Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat warning-message-control}@anchor{fa}@anchor{gnat_ugn/building_executable_programs_with_gnat id15}@anchor{ff} +@anchor{gnat_ugn/building_executable_programs_with_gnat warning-message-control}@anchor{eb}@anchor{gnat_ugn/building_executable_programs_with_gnat id15}@anchor{f0} @subsection Warning Message Control @@ -12812,7 +12620,7 @@ used in conjunction with an optimization level greater than zero. @item @code{-Wstack-usage=@emph{len}} Warn if the stack usage of a subprogram might be larger than @code{len} bytes. -See @ref{f5,,Static Stack Usage Analysis} for details. +See @ref{e6,,Static Stack Usage Analysis} for details. @end table @geindex -Wall (gcc) @@ -13010,7 +12818,7 @@ When no switch @code{-gnatw} is used, this is equivalent to: @end quotation @node Debugging and Assertion Control,Validity Checking,Warning Message Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat debugging-and-assertion-control}@anchor{100}@anchor{gnat_ugn/building_executable_programs_with_gnat id16}@anchor{101} +@anchor{gnat_ugn/building_executable_programs_with_gnat debugging-and-assertion-control}@anchor{f1}@anchor{gnat_ugn/building_executable_programs_with_gnat id16}@anchor{f2} @subsection Debugging and Assertion Control @@ -13099,7 +12907,7 @@ is @code{False}, the exception @code{Assert_Failure} is raised. @end table @node Validity Checking,Style Checking,Debugging and Assertion Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat validity-checking}@anchor{f6}@anchor{gnat_ugn/building_executable_programs_with_gnat id17}@anchor{102} +@anchor{gnat_ugn/building_executable_programs_with_gnat validity-checking}@anchor{e7}@anchor{gnat_ugn/building_executable_programs_with_gnat id17}@anchor{f3} @subsection Validity Checking @@ -13388,7 +13196,7 @@ the validity checking mode at the program source level, and also allows for temporary disabling of validity checks. @node Style Checking,Run-Time Checks,Validity Checking,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id18}@anchor{103}@anchor{gnat_ugn/building_executable_programs_with_gnat style-checking}@anchor{fb} +@anchor{gnat_ugn/building_executable_programs_with_gnat id18}@anchor{f4}@anchor{gnat_ugn/building_executable_programs_with_gnat style-checking}@anchor{ec} @subsection Style Checking @@ -14110,7 +13918,7 @@ built-in standard style check options are enabled. The switch @code{-gnatyN} clears any previously set style checks. @node Run-Time Checks,Using gcc for Syntax Checking,Style Checking,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat run-time-checks}@anchor{f9}@anchor{gnat_ugn/building_executable_programs_with_gnat id19}@anchor{104} +@anchor{gnat_ugn/building_executable_programs_with_gnat run-time-checks}@anchor{ea}@anchor{gnat_ugn/building_executable_programs_with_gnat id19}@anchor{f5} @subsection Run-Time Checks @@ -14304,7 +14112,7 @@ on subprogram calls and generic instantiations. Note that @code{-gnatE} is not necessary for safety, because in the default mode, GNAT ensures statically that the checks would not fail. For full details of the effect and use of this switch, -@ref{1c,,Compiling with gcc}. +@ref{c7,,Compiling with gcc}. @end table @geindex -fstack-check (gcc) @@ -14320,7 +14128,7 @@ For full details of the effect and use of this switch, @item @code{-fstack-check} Activates stack overflow checking. For full details of the effect and use of -this switch see @ref{f4,,Stack Overflow Checking}. +this switch see @ref{e5,,Stack Overflow Checking}. @end table @geindex Unsuppress @@ -14331,7 +14139,7 @@ checks) or @code{Unsuppress} (to add back suppressed checks) pragmas in the program source. @node Using gcc for Syntax Checking,Using gcc for Semantic Checking,Run-Time Checks,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id20}@anchor{105}@anchor{gnat_ugn/building_executable_programs_with_gnat using-gcc-for-syntax-checking}@anchor{106} +@anchor{gnat_ugn/building_executable_programs_with_gnat id20}@anchor{f6}@anchor{gnat_ugn/building_executable_programs_with_gnat using-gcc-for-syntax-checking}@anchor{f7} @subsection Using @code{gcc} for Syntax Checking @@ -14384,11 +14192,11 @@ Normally, GNAT allows only a single unit in a source file. However, this restriction does not apply in syntax-check-only mode, and it is possible to check a file containing multiple compilation units concatenated together. This is primarily used by the @code{gnatchop} utility -(@ref{36,,Renaming Files with gnatchop}). +(@ref{1d,,Renaming Files with gnatchop}). @end table @node Using gcc for Semantic Checking,Compiling Different Versions of Ada,Using gcc for Syntax Checking,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id21}@anchor{107}@anchor{gnat_ugn/building_executable_programs_with_gnat using-gcc-for-semantic-checking}@anchor{108} +@anchor{gnat_ugn/building_executable_programs_with_gnat id21}@anchor{f8}@anchor{gnat_ugn/building_executable_programs_with_gnat using-gcc-for-semantic-checking}@anchor{f9} @subsection Using @code{gcc} for Semantic Checking @@ -14413,13 +14221,13 @@ semantic restrictions on file structuring to operate in this mode: @item The needed source files must be accessible -(see @ref{89,,Search Paths and the Run-Time Library (RTL)}). +(see @ref{73,,Search Paths and the Run-Time Library (RTL)}). @item Each file must contain only one compilation unit. @item -The file name and unit name must match (@ref{52,,File Naming Rules}). +The file name and unit name must match (@ref{3b,,File Naming Rules}). @end itemize The output consists of error messages as appropriate. No object file is @@ -14435,7 +14243,7 @@ and specifications where a separate body is present). @end table @node Compiling Different Versions of Ada,Character Set Control,Using gcc for Semantic Checking,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-different-versions-of-ada}@anchor{6}@anchor{gnat_ugn/building_executable_programs_with_gnat id22}@anchor{109} +@anchor{gnat_ugn/building_executable_programs_with_gnat compiling-different-versions-of-ada}@anchor{6}@anchor{gnat_ugn/building_executable_programs_with_gnat id22}@anchor{fa} @subsection Compiling Different Versions of Ada @@ -14569,7 +14377,7 @@ extensions, see the GNAT reference manual. @end table @node Character Set Control,File Naming Control,Compiling Different Versions of Ada,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id23}@anchor{10a}@anchor{gnat_ugn/building_executable_programs_with_gnat character-set-control}@anchor{48} +@anchor{gnat_ugn/building_executable_programs_with_gnat id23}@anchor{fb}@anchor{gnat_ugn/building_executable_programs_with_gnat character-set-control}@anchor{31} @subsection Character Set Control @@ -14680,7 +14488,7 @@ allowed in identifiers @end multitable -See @ref{3e,,Foreign Language Representation} for full details on the +See @ref{23,,Foreign Language Representation} for full details on the implementation of these character sets. @end table @@ -14748,7 +14556,7 @@ Brackets encoding only (default value) For full details on these encoding -methods see @ref{4e,,Wide_Character Encodings}. +methods see @ref{37,,Wide_Character Encodings}. Note that brackets coding is always accepted, even if one of the other options is specified, so for example @code{-gnatW8} specifies that both brackets and UTF-8 encodings will be recognized. The units that are @@ -14796,7 +14604,7 @@ comments are ended by an appropriate (CR, or CR/LF, or LF) line terminator. This is a common mode for many programs with foreign language comments. @node File Naming Control,Subprogram Inlining Control,Character Set Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat file-naming-control}@anchor{10b}@anchor{gnat_ugn/building_executable_programs_with_gnat id24}@anchor{10c} +@anchor{gnat_ugn/building_executable_programs_with_gnat file-naming-control}@anchor{fc}@anchor{gnat_ugn/building_executable_programs_with_gnat id24}@anchor{fd} @subsection File Naming Control @@ -14812,11 +14620,11 @@ Activates file name 'krunching'. @code{n}, a decimal integer in the range including the @code{.ads} or @code{.adb} extension). The default is not to enable file name krunching. -For the source file naming rules, @ref{52,,File Naming Rules}. +For the source file naming rules, @ref{3b,,File Naming Rules}. @end table @node Subprogram Inlining Control,Auxiliary Output Control,File Naming Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat subprogram-inlining-control}@anchor{10d}@anchor{gnat_ugn/building_executable_programs_with_gnat id25}@anchor{10e} +@anchor{gnat_ugn/building_executable_programs_with_gnat subprogram-inlining-control}@anchor{fe}@anchor{gnat_ugn/building_executable_programs_with_gnat id25}@anchor{ff} @subsection Subprogram Inlining Control @@ -14849,7 +14657,7 @@ If you specify this switch the compiler will access these bodies, creating an extra source dependency for the resulting object file, and where possible, the call will be inlined. For further details on when inlining is possible -see @ref{10f,,Inlining of Subprograms}. +see @ref{100,,Inlining of Subprograms}. @end table @geindex -gnatN (gcc) @@ -14870,7 +14678,7 @@ inlining, but that is no longer the case. @end table @node Auxiliary Output Control,Debugging Control,Subprogram Inlining Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat auxiliary-output-control}@anchor{110}@anchor{gnat_ugn/building_executable_programs_with_gnat id26}@anchor{111} +@anchor{gnat_ugn/building_executable_programs_with_gnat auxiliary-output-control}@anchor{101}@anchor{gnat_ugn/building_executable_programs_with_gnat id26}@anchor{102} @subsection Auxiliary Output Control @@ -14940,7 +14748,7 @@ An object file has been generated for every source file. @end table @node Debugging Control,Exception Handling Control,Auxiliary Output Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat debugging-control}@anchor{112}@anchor{gnat_ugn/building_executable_programs_with_gnat id27}@anchor{113} +@anchor{gnat_ugn/building_executable_programs_with_gnat debugging-control}@anchor{103}@anchor{gnat_ugn/building_executable_programs_with_gnat id27}@anchor{104} @subsection Debugging Control @@ -15289,7 +15097,7 @@ encodings for the rest. @end table @node Exception Handling Control,Units to Sources Mapping Files,Debugging Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id28}@anchor{114}@anchor{gnat_ugn/building_executable_programs_with_gnat exception-handling-control}@anchor{115} +@anchor{gnat_ugn/building_executable_programs_with_gnat id28}@anchor{105}@anchor{gnat_ugn/building_executable_programs_with_gnat exception-handling-control}@anchor{106} @subsection Exception Handling Control @@ -15357,11 +15165,11 @@ is available for the target in use, otherwise it will generate an error. The same option @code{--RTS} must be used both for @code{gcc} and @code{gnatbind}. Passing this option to @code{gnatmake} -(@ref{dc,,Switches for gnatmake}) will ensure the required consistency +(@ref{cd,,Switches for gnatmake}) will ensure the required consistency through the compilation and binding steps. @node Units to Sources Mapping Files,Code Generation Control,Exception Handling Control,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat id29}@anchor{116}@anchor{gnat_ugn/building_executable_programs_with_gnat units-to-sources-mapping-files}@anchor{f7} +@anchor{gnat_ugn/building_executable_programs_with_gnat id29}@anchor{107}@anchor{gnat_ugn/building_executable_programs_with_gnat units-to-sources-mapping-files}@anchor{e8} @subsection Units to Sources Mapping Files @@ -15413,7 +15221,7 @@ mapping file and communicates it to the compiler using this switch. @end table @node Code Generation Control,,Units to Sources Mapping Files,Compiler Switches -@anchor{gnat_ugn/building_executable_programs_with_gnat code-generation-control}@anchor{117}@anchor{gnat_ugn/building_executable_programs_with_gnat id30}@anchor{118} +@anchor{gnat_ugn/building_executable_programs_with_gnat code-generation-control}@anchor{108}@anchor{gnat_ugn/building_executable_programs_with_gnat id30}@anchor{109} @subsection Code Generation Control @@ -15442,7 +15250,7 @@ there is no point in using @code{-m} switches to improve performance unless you actually see a performance improvement. @node Linker Switches,Binding with gnatbind,Compiler Switches,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat linker-switches}@anchor{119}@anchor{gnat_ugn/building_executable_programs_with_gnat id31}@anchor{11a} +@anchor{gnat_ugn/building_executable_programs_with_gnat linker-switches}@anchor{10a}@anchor{gnat_ugn/building_executable_programs_with_gnat id31}@anchor{10b} @section Linker Switches @@ -15462,7 +15270,7 @@ platforms. @end table @node Binding with gnatbind,Linking with gnatlink,Linker Switches,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat binding-with-gnatbind}@anchor{1d}@anchor{gnat_ugn/building_executable_programs_with_gnat id32}@anchor{11b} +@anchor{gnat_ugn/building_executable_programs_with_gnat binding-with-gnatbind}@anchor{c8}@anchor{gnat_ugn/building_executable_programs_with_gnat id32}@anchor{10c} @section Binding with @code{gnatbind} @@ -15513,7 +15321,7 @@ to be read by the @code{gnatlink} utility used to link the Ada application. @end menu @node Running gnatbind,Switches for gnatbind,,Binding with gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatbind}@anchor{11c}@anchor{gnat_ugn/building_executable_programs_with_gnat id33}@anchor{11d} +@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatbind}@anchor{10d}@anchor{gnat_ugn/building_executable_programs_with_gnat id33}@anchor{10e} @subsection Running @code{gnatbind} @@ -15598,7 +15406,7 @@ Ada code provided the @code{-g} switch is used for @code{gnatbind} and @code{gnatlink}. @node Switches for gnatbind,Command-Line Access,Running gnatbind,Binding with gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat id34}@anchor{11e}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatbind}@anchor{11f} +@anchor{gnat_ugn/building_executable_programs_with_gnat id34}@anchor{10f}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatbind}@anchor{110} @subsection Switches for @code{gnatbind} @@ -15793,7 +15601,7 @@ Currently the same as @code{-Ea}. @item @code{-f@emph{elab-order}} -Force elaboration order. For further details see @ref{120,,Elaboration Control} +Force elaboration order. For further details see @ref{111,,Elaboration Control} and @ref{f,,Elaboration Order Handling in GNAT}. @end table @@ -15842,7 +15650,7 @@ Legacy elaboration order model enabled. For further details see @item @code{-H32} Use 32-bit allocations for @code{__gnat_malloc} (and thus for access types). -For further details see @ref{121,,Dynamic Allocation Control}. +For further details see @ref{112,,Dynamic Allocation Control}. @end table @geindex -H64 (gnatbind) @@ -15855,7 +15663,7 @@ For further details see @ref{121,,Dynamic Allocation Control}. @item @code{-H64} Use 64-bit allocations for @code{__gnat_malloc} (and thus for access types). -For further details see @ref{121,,Dynamic Allocation Control}. +For further details see @ref{112,,Dynamic Allocation Control}. @geindex -I (gnatbind) @@ -15882,11 +15690,11 @@ Output chosen elaboration order. @item @code{-L@emph{xxx}} Bind the units for library building. In this case the @code{adainit} and -@code{adafinal} procedures (@ref{b4,,Binding with Non-Ada Main Programs}) +@code{adafinal} procedures (@ref{a0,,Binding with Non-Ada Main Programs}) are renamed to @code{@emph{xxx}init} and @code{@emph{xxx}final}. Implies -n. -(@ref{15,,GNAT and Libraries}, for more details.) +(@ref{2a,,GNAT and Libraries}, for more details.) @geindex -M (gnatbind) @@ -15953,7 +15761,7 @@ Do not look for library files in the system default directory. @item @code{--RTS=@emph{rts-path}} Specifies the default location of the run-time library. Same meaning as the -equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). +equivalent @code{gnatmake} flag (@ref{cd,,Switches for gnatmake}). @geindex -o (gnatbind) @@ -16107,7 +15915,7 @@ Enable dynamic stack usage, with @code{n} results stored and displayed at program termination. A result is generated when a task terminates. Results that can't be stored are displayed on the fly, at task termination. This option is currently not supported on Itanium -platforms. (See @ref{122,,Dynamic Stack Usage Analysis} for details.) +platforms. (See @ref{113,,Dynamic Stack Usage Analysis} for details.) @geindex -v (gnatbind) @@ -16184,7 +15992,7 @@ no arguments. @end menu @node Consistency-Checking Modes,Binder Error Message Control,,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat consistency-checking-modes}@anchor{123}@anchor{gnat_ugn/building_executable_programs_with_gnat id35}@anchor{124} +@anchor{gnat_ugn/building_executable_programs_with_gnat consistency-checking-modes}@anchor{114}@anchor{gnat_ugn/building_executable_programs_with_gnat id35}@anchor{115} @subsubsection Consistency-Checking Modes @@ -16238,7 +16046,7 @@ case the checking against sources has already been performed by @end table @node Binder Error Message Control,Elaboration Control,Consistency-Checking Modes,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat id36}@anchor{125}@anchor{gnat_ugn/building_executable_programs_with_gnat binder-error-message-control}@anchor{126} +@anchor{gnat_ugn/building_executable_programs_with_gnat id36}@anchor{116}@anchor{gnat_ugn/building_executable_programs_with_gnat binder-error-message-control}@anchor{117} @subsubsection Binder Error Message Control @@ -16348,7 +16156,7 @@ with extreme care. @end table @node Elaboration Control,Output Control,Binder Error Message Control,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat id37}@anchor{127}@anchor{gnat_ugn/building_executable_programs_with_gnat elaboration-control}@anchor{120} +@anchor{gnat_ugn/building_executable_programs_with_gnat id37}@anchor{118}@anchor{gnat_ugn/building_executable_programs_with_gnat elaboration-control}@anchor{111} @subsubsection Elaboration Control @@ -16433,7 +16241,7 @@ debugging/experimental use. @end table @node Output Control,Dynamic Allocation Control,Elaboration Control,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat output-control}@anchor{128}@anchor{gnat_ugn/building_executable_programs_with_gnat id38}@anchor{129} +@anchor{gnat_ugn/building_executable_programs_with_gnat output-control}@anchor{119}@anchor{gnat_ugn/building_executable_programs_with_gnat id38}@anchor{11a} @subsubsection Output Control @@ -16514,7 +16322,7 @@ be used to improve code generation in some cases. @end table @node Dynamic Allocation Control,Binding with Non-Ada Main Programs,Output Control,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat dynamic-allocation-control}@anchor{121}@anchor{gnat_ugn/building_executable_programs_with_gnat id39}@anchor{12a} +@anchor{gnat_ugn/building_executable_programs_with_gnat dynamic-allocation-control}@anchor{112}@anchor{gnat_ugn/building_executable_programs_with_gnat id39}@anchor{11b} @subsubsection Dynamic Allocation Control @@ -16540,7 +16348,7 @@ unless explicitly overridden by a @code{'Size} clause on the access type. These switches are only effective on VMS platforms. @node Binding with Non-Ada Main Programs,Binding Programs with No Main Subprogram,Dynamic Allocation Control,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat binding-with-non-ada-main-programs}@anchor{b4}@anchor{gnat_ugn/building_executable_programs_with_gnat id40}@anchor{12b} +@anchor{gnat_ugn/building_executable_programs_with_gnat binding-with-non-ada-main-programs}@anchor{a0}@anchor{gnat_ugn/building_executable_programs_with_gnat id40}@anchor{11c} @subsubsection Binding with Non-Ada Main Programs @@ -16549,7 +16357,7 @@ program is in Ada, and that the task of the binder is to generate a corresponding function @code{main} that invokes this Ada main program. GNAT also supports the building of executable programs where the main program is not in Ada, but some of the called routines are -written in Ada and compiled using GNAT (@ref{44,,Mixed Language Programming}). +written in Ada and compiled using GNAT (@ref{2c,,Mixed Language Programming}). The following switch is used in this situation: @quotation @@ -16636,7 +16444,7 @@ side effect is that this could be the wrong mode for the foreign code where floating point computation could be broken after this call. @node Binding Programs with No Main Subprogram,,Binding with Non-Ada Main Programs,Switches for gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat binding-programs-with-no-main-subprogram}@anchor{12c}@anchor{gnat_ugn/building_executable_programs_with_gnat id41}@anchor{12d} +@anchor{gnat_ugn/building_executable_programs_with_gnat binding-programs-with-no-main-subprogram}@anchor{11d}@anchor{gnat_ugn/building_executable_programs_with_gnat id41}@anchor{11e} @subsubsection Binding Programs with No Main Subprogram @@ -16667,7 +16475,7 @@ the binder switch @end table @node Command-Line Access,Search Paths for gnatbind,Switches for gnatbind,Binding with gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat id42}@anchor{12e}@anchor{gnat_ugn/building_executable_programs_with_gnat command-line-access}@anchor{12f} +@anchor{gnat_ugn/building_executable_programs_with_gnat id42}@anchor{11f}@anchor{gnat_ugn/building_executable_programs_with_gnat command-line-access}@anchor{120} @subsection Command-Line Access @@ -16697,7 +16505,7 @@ required, your main program must set @code{gnat_argc} and it. @node Search Paths for gnatbind,Examples of gnatbind Usage,Command-Line Access,Binding with gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat search-paths-for-gnatbind}@anchor{8c}@anchor{gnat_ugn/building_executable_programs_with_gnat id43}@anchor{130} +@anchor{gnat_ugn/building_executable_programs_with_gnat search-paths-for-gnatbind}@anchor{76}@anchor{gnat_ugn/building_executable_programs_with_gnat id43}@anchor{121} @subsection Search Paths for @code{gnatbind} @@ -16705,7 +16513,7 @@ The binder takes the name of an ALI file as its argument and needs to locate source files as well as other ALI files to verify object consistency. For source files, it follows exactly the same search rules as @code{gcc} -(see @ref{89,,Search Paths and the Run-Time Library (RTL)}). For ALI files the +(see @ref{73,,Search Paths and the Run-Time Library (RTL)}). For ALI files the directories searched are: @@ -16754,7 +16562,7 @@ of GNAT). The content of the @code{ada_object_path} file which is part of the GNAT installation tree and is used to store standard libraries such as the GNAT Run-Time Library (RTL) unless the switch @code{-nostdlib} is -specified. See @ref{87,,Installing a library} +specified. See @ref{71,,Installing a library} @end itemize @geindex -I (gnatbind) @@ -16801,7 +16609,7 @@ in compiling sources from multiple directories. This can make development environments much more flexible. @node Examples of gnatbind Usage,,Search Paths for gnatbind,Binding with gnatbind -@anchor{gnat_ugn/building_executable_programs_with_gnat id44}@anchor{131}@anchor{gnat_ugn/building_executable_programs_with_gnat examples-of-gnatbind-usage}@anchor{132} +@anchor{gnat_ugn/building_executable_programs_with_gnat id44}@anchor{122}@anchor{gnat_ugn/building_executable_programs_with_gnat examples-of-gnatbind-usage}@anchor{123} @subsection Examples of @code{gnatbind} Usage @@ -16830,7 +16638,7 @@ since gnatlink will not be able to find the generated file. @end quotation @node Linking with gnatlink,Using the GNU make Utility,Binding with gnatbind,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat id45}@anchor{133}@anchor{gnat_ugn/building_executable_programs_with_gnat linking-with-gnatlink}@anchor{1e} +@anchor{gnat_ugn/building_executable_programs_with_gnat id45}@anchor{124}@anchor{gnat_ugn/building_executable_programs_with_gnat linking-with-gnatlink}@anchor{c9} @section Linking with @code{gnatlink} @@ -16851,7 +16659,7 @@ generated by the @code{gnatbind} to determine this list. @end menu @node Running gnatlink,Switches for gnatlink,,Linking with gnatlink -@anchor{gnat_ugn/building_executable_programs_with_gnat id46}@anchor{134}@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatlink}@anchor{135} +@anchor{gnat_ugn/building_executable_programs_with_gnat id46}@anchor{125}@anchor{gnat_ugn/building_executable_programs_with_gnat running-gnatlink}@anchor{126} @subsection Running @code{gnatlink} @@ -16910,8 +16718,8 @@ $ gnatlink my_prog -Wl,-Map,MAPFILE Using @code{linker options} it is possible to set the program stack and heap size. -See @ref{136,,Setting Stack Size from gnatlink} and -@ref{137,,Setting Heap Size from gnatlink}. +See @ref{127,,Setting Stack Size from gnatlink} and +@ref{128,,Setting Heap Size from gnatlink}. @code{gnatlink} determines the list of objects required by the Ada program and prepends them to the list of objects passed to the linker. @@ -16920,7 +16728,7 @@ program and prepends them to the list of objects passed to the linker. presented to the linker. @node Switches for gnatlink,,Running gnatlink,Linking with gnatlink -@anchor{gnat_ugn/building_executable_programs_with_gnat id47}@anchor{138}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatlink}@anchor{139} +@anchor{gnat_ugn/building_executable_programs_with_gnat id47}@anchor{129}@anchor{gnat_ugn/building_executable_programs_with_gnat switches-for-gnatlink}@anchor{12a} @subsection Switches for @code{gnatlink} @@ -17115,7 +16923,7 @@ switch. @end table @node Using the GNU make Utility,,Linking with gnatlink,Building Executable Programs with GNAT -@anchor{gnat_ugn/building_executable_programs_with_gnat using-the-gnu-make-utility}@anchor{1f}@anchor{gnat_ugn/building_executable_programs_with_gnat id48}@anchor{13a} +@anchor{gnat_ugn/building_executable_programs_with_gnat using-the-gnu-make-utility}@anchor{70}@anchor{gnat_ugn/building_executable_programs_with_gnat id48}@anchor{12b} @section Using the GNU @code{make} Utility @@ -17124,7 +16932,7 @@ switch. This chapter offers some examples of makefiles that solve specific problems. It does not explain how to write a makefile, nor does it try to replace the -@code{gnatmake} utility (@ref{1b,,Building with gnatmake}). +@code{gnatmake} utility (@ref{c6,,Building with gnatmake}). All the examples in this section are specific to the GNU version of make. Although @code{make} is a standard utility, and the basic language @@ -17140,7 +16948,7 @@ is the same, these examples use some advanced features found only in @end menu @node Using gnatmake in a Makefile,Automatically Creating a List of Directories,,Using the GNU make Utility -@anchor{gnat_ugn/building_executable_programs_with_gnat using-gnatmake-in-a-makefile}@anchor{13b}@anchor{gnat_ugn/building_executable_programs_with_gnat id49}@anchor{13c} +@anchor{gnat_ugn/building_executable_programs_with_gnat using-gnatmake-in-a-makefile}@anchor{12c}@anchor{gnat_ugn/building_executable_programs_with_gnat id49}@anchor{12d} @subsection Using gnatmake in a Makefile @@ -17159,7 +16967,7 @@ the appropriate directories. Note that you should also read the example on how to automatically create the list of directories -(@ref{13d,,Automatically Creating a List of Directories}) +(@ref{12e,,Automatically Creating a List of Directories}) which might help you in case your project has a lot of subdirectories. @example @@ -17239,7 +17047,7 @@ clean:: @end example @node Automatically Creating a List of Directories,Generating the Command Line Switches,Using gnatmake in a Makefile,Using the GNU make Utility -@anchor{gnat_ugn/building_executable_programs_with_gnat id50}@anchor{13e}@anchor{gnat_ugn/building_executable_programs_with_gnat automatically-creating-a-list-of-directories}@anchor{13d} +@anchor{gnat_ugn/building_executable_programs_with_gnat id50}@anchor{12f}@anchor{gnat_ugn/building_executable_programs_with_gnat automatically-creating-a-list-of-directories}@anchor{12e} @subsection Automatically Creating a List of Directories @@ -17312,12 +17120,12 @@ DIRS := $@{shell find $@{ROOT_DIRECTORY@} -type d -print@} @end example @node Generating the Command Line Switches,Overcoming Command Line Length Limits,Automatically Creating a List of Directories,Using the GNU make Utility -@anchor{gnat_ugn/building_executable_programs_with_gnat id51}@anchor{13f}@anchor{gnat_ugn/building_executable_programs_with_gnat generating-the-command-line-switches}@anchor{140} +@anchor{gnat_ugn/building_executable_programs_with_gnat id51}@anchor{130}@anchor{gnat_ugn/building_executable_programs_with_gnat generating-the-command-line-switches}@anchor{131} @subsection Generating the Command Line Switches Once you have created the list of directories as explained in the -previous section (@ref{13d,,Automatically Creating a List of Directories}), +previous section (@ref{12e,,Automatically Creating a List of Directories}), you can easily generate the command line arguments to pass to gnatmake. For the sake of completeness, this example assumes that the source path @@ -17338,7 +17146,7 @@ all: @end example @node Overcoming Command Line Length Limits,,Generating the Command Line Switches,Using the GNU make Utility -@anchor{gnat_ugn/building_executable_programs_with_gnat overcoming-command-line-length-limits}@anchor{141}@anchor{gnat_ugn/building_executable_programs_with_gnat id52}@anchor{142} +@anchor{gnat_ugn/building_executable_programs_with_gnat overcoming-command-line-length-limits}@anchor{132}@anchor{gnat_ugn/building_executable_programs_with_gnat id52}@anchor{133} @subsection Overcoming Command Line Length Limits @@ -17353,7 +17161,7 @@ even none on most systems). It assumes that you have created a list of directories in your Makefile, using one of the methods presented in -@ref{13d,,Automatically Creating a List of Directories}. +@ref{12e,,Automatically Creating a List of Directories}. For the sake of completeness, we assume that the object path (where the ALI files are found) is different from the sources patch. @@ -17396,7 +17204,7 @@ all: @end example @node GNAT Utility Programs,GNAT and Program Execution,Building Executable Programs with GNAT,Top -@anchor{gnat_ugn/gnat_utility_programs doc}@anchor{143}@anchor{gnat_ugn/gnat_utility_programs gnat-utility-programs}@anchor{b}@anchor{gnat_ugn/gnat_utility_programs id1}@anchor{144} +@anchor{gnat_ugn/gnat_utility_programs doc}@anchor{134}@anchor{gnat_ugn/gnat_utility_programs gnat-utility-programs}@anchor{b}@anchor{gnat_ugn/gnat_utility_programs id1}@anchor{135} @chapter GNAT Utility Programs @@ -17407,16 +17215,16 @@ This chapter describes a number of utility programs: @itemize * @item -@ref{20,,The File Cleanup Utility gnatclean} +@ref{136,,The File Cleanup Utility gnatclean} @item -@ref{21,,The GNAT Library Browser gnatls} +@ref{137,,The GNAT Library Browser gnatls} @item -@ref{22,,The Cross-Referencing Tools gnatxref and gnatfind} +@ref{138,,The Cross-Referencing Tools gnatxref and gnatfind} @item -@ref{23,,The Ada to HTML Converter gnathtml} +@ref{139,,The Ada to HTML Converter gnathtml} @end itemize Other GNAT utilities are described elsewhere in this manual: @@ -17425,16 +17233,16 @@ Other GNAT utilities are described elsewhere in this manual: @itemize * @item -@ref{59,,Handling Arbitrary File Naming Conventions with gnatname} +@ref{42,,Handling Arbitrary File Naming Conventions with gnatname} @item -@ref{63,,File Name Krunching with gnatkr} +@ref{4c,,File Name Krunching with gnatkr} @item -@ref{36,,Renaming Files with gnatchop} +@ref{1d,,Renaming Files with gnatchop} @item -@ref{17,,Preprocessing with gnatprep} +@ref{8f,,Preprocessing with gnatprep} @end itemize @menu @@ -17446,7 +17254,7 @@ Other GNAT utilities are described elsewhere in this manual: @end menu @node The File Cleanup Utility gnatclean,The GNAT Library Browser gnatls,,GNAT Utility Programs -@anchor{gnat_ugn/gnat_utility_programs id2}@anchor{145}@anchor{gnat_ugn/gnat_utility_programs the-file-cleanup-utility-gnatclean}@anchor{20} +@anchor{gnat_ugn/gnat_utility_programs id2}@anchor{13a}@anchor{gnat_ugn/gnat_utility_programs the-file-cleanup-utility-gnatclean}@anchor{136} @section The File Cleanup Utility @code{gnatclean} @@ -17466,7 +17274,7 @@ generated files and executable files. @end menu @node Running gnatclean,Switches for gnatclean,,The File Cleanup Utility gnatclean -@anchor{gnat_ugn/gnat_utility_programs running-gnatclean}@anchor{146}@anchor{gnat_ugn/gnat_utility_programs id3}@anchor{147} +@anchor{gnat_ugn/gnat_utility_programs running-gnatclean}@anchor{13b}@anchor{gnat_ugn/gnat_utility_programs id3}@anchor{13c} @subsection Running @code{gnatclean} @@ -17490,7 +17298,7 @@ the linker. In informative-only mode, specified by switch normal mode is listed, but no file is actually deleted. @node Switches for gnatclean,,Running gnatclean,The File Cleanup Utility gnatclean -@anchor{gnat_ugn/gnat_utility_programs id4}@anchor{148}@anchor{gnat_ugn/gnat_utility_programs switches-for-gnatclean}@anchor{149} +@anchor{gnat_ugn/gnat_utility_programs id4}@anchor{13d}@anchor{gnat_ugn/gnat_utility_programs switches-for-gnatclean}@anchor{13e} @subsection Switches for @code{gnatclean} @@ -17641,7 +17449,7 @@ Verbose mode. @item @code{-vP@emph{x}} Indicates the verbosity of the parsing of GNAT project files. -@ref{de,,Switches Related to Project Files}. +@ref{cf,,Switches Related to Project Files}. @end table @geindex -X (gnatclean) @@ -17654,7 +17462,7 @@ Indicates the verbosity of the parsing of GNAT project files. Indicates that external variable @code{name} has the value @code{value}. The Project Manager will use this value for occurrences of @code{external(name)} when parsing the project file. -See @ref{de,,Switches Related to Project Files}. +See @ref{cf,,Switches Related to Project Files}. @end table @geindex -aO (gnatclean) @@ -17692,7 +17500,7 @@ where @code{gnatclean} was invoked. @end table @node The GNAT Library Browser gnatls,The Cross-Referencing Tools gnatxref and gnatfind,The File Cleanup Utility gnatclean,GNAT Utility Programs -@anchor{gnat_ugn/gnat_utility_programs the-gnat-library-browser-gnatls}@anchor{21}@anchor{gnat_ugn/gnat_utility_programs id5}@anchor{14a} +@anchor{gnat_ugn/gnat_utility_programs the-gnat-library-browser-gnatls}@anchor{137}@anchor{gnat_ugn/gnat_utility_programs id5}@anchor{13f} @section The GNAT Library Browser @code{gnatls} @@ -17713,7 +17521,7 @@ as well as various characteristics. @end menu @node Running gnatls,Switches for gnatls,,The GNAT Library Browser gnatls -@anchor{gnat_ugn/gnat_utility_programs id6}@anchor{14b}@anchor{gnat_ugn/gnat_utility_programs running-gnatls}@anchor{14c} +@anchor{gnat_ugn/gnat_utility_programs id6}@anchor{140}@anchor{gnat_ugn/gnat_utility_programs running-gnatls}@anchor{141} @subsection Running @code{gnatls} @@ -17727,7 +17535,7 @@ $ gnatls switches object_or_ali_file @end quotation The main argument is the list of object or @code{ali} files -(see @ref{42,,The Ada Library Information Files}) +(see @ref{28,,The Ada Library Information Files}) for which information is requested. In normal mode, without additional option, @code{gnatls} produces a @@ -17793,7 +17601,7 @@ version of the same source that has been modified. @end table @node Switches for gnatls,Example of gnatls Usage,Running gnatls,The GNAT Library Browser gnatls -@anchor{gnat_ugn/gnat_utility_programs id7}@anchor{14d}@anchor{gnat_ugn/gnat_utility_programs switches-for-gnatls}@anchor{14e} +@anchor{gnat_ugn/gnat_utility_programs id7}@anchor{142}@anchor{gnat_ugn/gnat_utility_programs switches-for-gnatls}@anchor{143} @subsection Switches for @code{gnatls} @@ -17908,7 +17716,7 @@ Several such switches may be specified simultaneously. @item @code{-aO@emph{dir}}, @code{-aI@emph{dir}}, @code{-I@emph{dir}}, @code{-I-}, @code{-nostdinc} Source path manipulation. Same meaning as the equivalent @code{gnatmake} -flags (@ref{dc,,Switches for gnatmake}). +flags (@ref{cd,,Switches for gnatmake}). @end table @geindex -aP (gnatls) @@ -17929,7 +17737,7 @@ Add @code{dir} at the beginning of the project search dir. @item @code{--RTS=@emph{rts-path}} Specifies the default location of the runtime library. Same meaning as the -equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). +equivalent @code{gnatmake} flag (@ref{cd,,Switches for gnatmake}). @end table @geindex -v (gnatls) @@ -17975,7 +17783,7 @@ by the user. @end table @node Example of gnatls Usage,,Switches for gnatls,The GNAT Library Browser gnatls -@anchor{gnat_ugn/gnat_utility_programs id8}@anchor{14f}@anchor{gnat_ugn/gnat_utility_programs example-of-gnatls-usage}@anchor{150} +@anchor{gnat_ugn/gnat_utility_programs id8}@anchor{144}@anchor{gnat_ugn/gnat_utility_programs example-of-gnatls-usage}@anchor{145} @subsection Example of @code{gnatls} Usage @@ -18055,7 +17863,7 @@ instr.ads @end quotation @node The Cross-Referencing Tools gnatxref and gnatfind,The Ada to HTML Converter gnathtml,The GNAT Library Browser gnatls,GNAT Utility Programs -@anchor{gnat_ugn/gnat_utility_programs the-cross-referencing-tools-gnatxref-and-gnatfind}@anchor{22}@anchor{gnat_ugn/gnat_utility_programs id9}@anchor{151} +@anchor{gnat_ugn/gnat_utility_programs the-cross-referencing-tools-gnatxref-and-gnatfind}@anchor{138}@anchor{gnat_ugn/gnat_utility_programs id9}@anchor{146} @section The Cross-Referencing Tools @code{gnatxref} and @code{gnatfind} @@ -18083,7 +17891,7 @@ cross-references. To use these tools, you must not compile your application using the @code{-gnatx} switch on the @code{gnatmake} command line -(see @ref{1b,,Building with gnatmake}). Otherwise, cross-referencing +(see @ref{c6,,Building with gnatmake}). Otherwise, cross-referencing information will not be generated. @menu @@ -18097,7 +17905,7 @@ information will not be generated. @end menu @node gnatxref Switches,gnatfind Switches,,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs id10}@anchor{152}@anchor{gnat_ugn/gnat_utility_programs gnatxref-switches}@anchor{153} +@anchor{gnat_ugn/gnat_utility_programs id10}@anchor{147}@anchor{gnat_ugn/gnat_utility_programs gnatxref-switches}@anchor{148} @subsection @code{gnatxref} Switches @@ -18232,7 +18040,7 @@ be considered. @item @code{--RTS=@emph{rts-path}} Specifies the default location of the runtime library. Same meaning as the -equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). +equivalent @code{gnatmake} flag (@ref{cd,,Switches for gnatmake}). @end table @geindex -d (gnatxref) @@ -18293,7 +18101,7 @@ If a file is specified, then the content of the source directory and object directory lines are added as if they had been specified respectively by @code{-aI} and @code{-aO}. -See @ref{154,,Configuration Files for gnatxref and gnatfind} for the syntax +See @ref{149,,Configuration Files for gnatxref and gnatfind} for the syntax of this configuration file. @item @code{-u} @@ -18306,7 +18114,7 @@ display every unused entity and 'with'ed package. Instead of producing the default output, @code{gnatxref} will generate a @code{tags} file that can be used by vi. For examples how to use this -feature, see @ref{155,,Examples of gnatxref Usage}. The tags file is output +feature, see @ref{14a,,Examples of gnatxref Usage}. The tags file is output to the standard output, thus you will have to redirect it to a file. @end table @@ -18315,7 +18123,7 @@ appear after the file names. They need not be separated by spaces, thus you can say @code{gnatxref -ag} instead of @code{gnatxref -a -g}. @node gnatfind Switches,Configuration Files for gnatxref and gnatfind,gnatxref Switches,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs id11}@anchor{156}@anchor{gnat_ugn/gnat_utility_programs gnatfind-switches}@anchor{157} +@anchor{gnat_ugn/gnat_utility_programs id11}@anchor{14b}@anchor{gnat_ugn/gnat_utility_programs gnatfind-switches}@anchor{14c} @subsection @code{gnatfind} Switches @@ -18337,7 +18145,7 @@ with the following iterpretation of the command arguments: @item @emph{pattern} An entity will be output only if it matches the regular expression found -in @emph{pattern}, see @ref{158,,Regular Expressions in gnatfind and gnatxref}. +in @emph{pattern}, see @ref{14d,,Regular Expressions in gnatfind and gnatxref}. Omitting the pattern is equivalent to specifying @code{*}, which will match any entity. Note that if you do not provide a pattern, you @@ -18351,7 +18159,7 @@ for matching purposes. At the current time there is no support for @code{gnatfind} will look for references, bodies or declarations of symbols referenced in @code{sourcefile}, at line @code{line} -and column @code{column}. See @ref{159,,Examples of gnatfind Usage} +and column @code{column}. See @ref{14e,,Examples of gnatfind Usage} for syntax examples. @item @emph{line} @@ -18489,7 +18297,7 @@ overrides the default, only the new extension will be considered. @item @code{--RTS=@emph{rts-path}} Specifies the default location of the runtime library. Same meaning as the -equivalent @code{gnatmake} flag (@ref{dc,,Switches for gnatmake}). +equivalent @code{gnatmake} flag (@ref{cd,,Switches for gnatmake}). @end table @geindex -d (gnatfind) @@ -18562,7 +18370,7 @@ If a file is specified, then the content of the source directory and object directory lines are added as if they had been specified respectively by @code{-aI} and @code{-aO}. -See @ref{154,,Configuration Files for gnatxref and gnatfind} for the syntax +See @ref{149,,Configuration Files for gnatxref and gnatfind} for the syntax of this configuration file. @end table @@ -18614,7 +18422,7 @@ search path. You can force it to look only in the current directory if you specify @code{*} at the end of the command line. @node Configuration Files for gnatxref and gnatfind,Regular Expressions in gnatfind and gnatxref,gnatfind Switches,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs configuration-files-for-gnatxref-and-gnatfind}@anchor{154}@anchor{gnat_ugn/gnat_utility_programs id12}@anchor{15a} +@anchor{gnat_ugn/gnat_utility_programs configuration-files-for-gnatxref-and-gnatfind}@anchor{149}@anchor{gnat_ugn/gnat_utility_programs id12}@anchor{14f} @subsection Configuration Files for @code{gnatxref} and @code{gnatfind} @@ -18655,7 +18463,7 @@ they are specified Any other line will be silently ignored. @node Regular Expressions in gnatfind and gnatxref,Examples of gnatxref Usage,Configuration Files for gnatxref and gnatfind,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs id13}@anchor{15b}@anchor{gnat_ugn/gnat_utility_programs regular-expressions-in-gnatfind-and-gnatxref}@anchor{158} +@anchor{gnat_ugn/gnat_utility_programs id13}@anchor{150}@anchor{gnat_ugn/gnat_utility_programs regular-expressions-in-gnatfind-and-gnatxref}@anchor{14d} @subsection Regular Expressions in @code{gnatfind} and @code{gnatxref} @@ -18748,7 +18556,7 @@ least one character. @end itemize @node Examples of gnatxref Usage,Examples of gnatfind Usage,Regular Expressions in gnatfind and gnatxref,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs examples-of-gnatxref-usage}@anchor{155}@anchor{gnat_ugn/gnat_utility_programs id14}@anchor{15c} +@anchor{gnat_ugn/gnat_utility_programs examples-of-gnatxref-usage}@anchor{14a}@anchor{gnat_ugn/gnat_utility_programs id14}@anchor{151} @subsection Examples of @code{gnatxref} Usage @@ -18759,7 +18567,7 @@ least one character. @end menu @node General Usage,Using gnatxref with vi,,Examples of gnatxref Usage -@anchor{gnat_ugn/gnat_utility_programs general-usage}@anchor{15d} +@anchor{gnat_ugn/gnat_utility_programs general-usage}@anchor{152} @subsubsection General Usage @@ -18859,7 +18667,7 @@ of these. @end quotation @node Using gnatxref with vi,,General Usage,Examples of gnatxref Usage -@anchor{gnat_ugn/gnat_utility_programs using-gnatxref-with-vi}@anchor{15e} +@anchor{gnat_ugn/gnat_utility_programs using-gnatxref-with-vi}@anchor{153} @subsubsection Using @code{gnatxref} with @code{vi} @@ -18890,7 +18698,7 @@ From @code{vi}, you can then use the command @code{:tag @emph{entity}} display a new file with the corresponding declaration of entity. @node Examples of gnatfind Usage,,Examples of gnatxref Usage,The Cross-Referencing Tools gnatxref and gnatfind -@anchor{gnat_ugn/gnat_utility_programs id15}@anchor{15f}@anchor{gnat_ugn/gnat_utility_programs examples-of-gnatfind-usage}@anchor{159} +@anchor{gnat_ugn/gnat_utility_programs id15}@anchor{154}@anchor{gnat_ugn/gnat_utility_programs examples-of-gnatfind-usage}@anchor{14e} @subsection Examples of @code{gnatfind} Usage @@ -18965,14 +18773,14 @@ point to any character in the middle of the identifier. @end itemize @node The Ada to HTML Converter gnathtml,,The Cross-Referencing Tools gnatxref and gnatfind,GNAT Utility Programs -@anchor{gnat_ugn/gnat_utility_programs the-ada-to-html-converter-gnathtml}@anchor{23}@anchor{gnat_ugn/gnat_utility_programs id16}@anchor{160} +@anchor{gnat_ugn/gnat_utility_programs the-ada-to-html-converter-gnathtml}@anchor{139}@anchor{gnat_ugn/gnat_utility_programs id16}@anchor{155} @section The Ada to HTML Converter @code{gnathtml} @geindex gnathtml @code{gnathtml} is a Perl script that allows Ada source files to be browsed using -standard Web browsers. For installation information, see @ref{161,,Installing gnathtml}. +standard Web browsers. For installation information, see @ref{156,,Installing gnathtml}. Ada reserved keywords are highlighted in a bold font and Ada comments in a blue font. Unless your program was compiled with the gcc @code{-gnatx} @@ -18987,7 +18795,7 @@ be able to click on any identifier and go to its declaration. @end menu @node Invoking gnathtml,Installing gnathtml,,The Ada to HTML Converter gnathtml -@anchor{gnat_ugn/gnat_utility_programs invoking-gnathtml}@anchor{162}@anchor{gnat_ugn/gnat_utility_programs id17}@anchor{163} +@anchor{gnat_ugn/gnat_utility_programs invoking-gnathtml}@anchor{157}@anchor{gnat_ugn/gnat_utility_programs id17}@anchor{158} @subsection Invoking @code{gnathtml} @@ -19153,7 +18961,7 @@ systems. @end table @node Installing gnathtml,,Invoking gnathtml,The Ada to HTML Converter gnathtml -@anchor{gnat_ugn/gnat_utility_programs installing-gnathtml}@anchor{161}@anchor{gnat_ugn/gnat_utility_programs id18}@anchor{164} +@anchor{gnat_ugn/gnat_utility_programs installing-gnathtml}@anchor{156}@anchor{gnat_ugn/gnat_utility_programs id18}@anchor{159} @subsection Installing @code{gnathtml} @@ -19198,7 +19006,7 @@ $ perl gnathtml.pl [ switches ] files @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit @node GNAT and Program Execution,Platform-Specific Information,GNAT Utility Programs,Top -@anchor{gnat_ugn/gnat_and_program_execution gnat-and-program-execution}@anchor{c}@anchor{gnat_ugn/gnat_and_program_execution doc}@anchor{165}@anchor{gnat_ugn/gnat_and_program_execution id1}@anchor{166} +@anchor{gnat_ugn/gnat_and_program_execution gnat-and-program-execution}@anchor{c}@anchor{gnat_ugn/gnat_and_program_execution doc}@anchor{15a}@anchor{gnat_ugn/gnat_and_program_execution id1}@anchor{15b} @chapter GNAT and Program Execution @@ -19208,25 +19016,25 @@ This chapter covers several topics: @itemize * @item -@ref{167,,Running and Debugging Ada Programs} +@ref{15c,,Running and Debugging Ada Programs} @item -@ref{25,,Profiling} +@ref{15d,,Profiling} @item -@ref{168,,Improving Performance} +@ref{15e,,Improving Performance} @item -@ref{169,,Overflow Check Handling in GNAT} +@ref{15f,,Overflow Check Handling in GNAT} @item -@ref{16a,,Performing Dimensionality Analysis in GNAT} +@ref{160,,Performing Dimensionality Analysis in GNAT} @item -@ref{16b,,Stack Related Facilities} +@ref{161,,Stack Related Facilities} @item -@ref{16c,,Memory Management Issues} +@ref{162,,Memory Management Issues} @end itemize @menu @@ -19241,7 +19049,7 @@ This chapter covers several topics: @end menu @node Running and Debugging Ada Programs,Profiling,,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution id2}@anchor{167}@anchor{gnat_ugn/gnat_and_program_execution running-and-debugging-ada-programs}@anchor{24} +@anchor{gnat_ugn/gnat_and_program_execution id2}@anchor{15c}@anchor{gnat_ugn/gnat_and_program_execution running-and-debugging-ada-programs}@anchor{163} @section Running and Debugging Ada Programs @@ -19295,7 +19103,7 @@ the incorrect user program. @end menu @node The GNAT Debugger GDB,Running GDB,,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debugger-gdb}@anchor{16d}@anchor{gnat_ugn/gnat_and_program_execution id3}@anchor{16e} +@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debugger-gdb}@anchor{164}@anchor{gnat_ugn/gnat_and_program_execution id3}@anchor{165} @subsection The GNAT Debugger GDB @@ -19352,7 +19160,7 @@ the debugging information and can respond to user commands to inspect variables, and more generally to report on the state of execution. @node Running GDB,Introduction to GDB Commands,The GNAT Debugger GDB,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution id4}@anchor{16f}@anchor{gnat_ugn/gnat_and_program_execution running-gdb}@anchor{170} +@anchor{gnat_ugn/gnat_and_program_execution id4}@anchor{166}@anchor{gnat_ugn/gnat_and_program_execution running-gdb}@anchor{167} @subsection Running GDB @@ -19379,7 +19187,7 @@ exactly as if the debugger were not present. The following section describes some of the additional commands that can be given to @code{GDB}. @node Introduction to GDB Commands,Using Ada Expressions,Running GDB,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution introduction-to-gdb-commands}@anchor{171}@anchor{gnat_ugn/gnat_and_program_execution id5}@anchor{172} +@anchor{gnat_ugn/gnat_and_program_execution introduction-to-gdb-commands}@anchor{168}@anchor{gnat_ugn/gnat_and_program_execution id5}@anchor{169} @subsection Introduction to GDB Commands @@ -19587,7 +19395,7 @@ Note that most commands can be abbreviated (for example, c for continue, bt for backtrace). @node Using Ada Expressions,Calling User-Defined Subprograms,Introduction to GDB Commands,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution id6}@anchor{173}@anchor{gnat_ugn/gnat_and_program_execution using-ada-expressions}@anchor{174} +@anchor{gnat_ugn/gnat_and_program_execution id6}@anchor{16a}@anchor{gnat_ugn/gnat_and_program_execution using-ada-expressions}@anchor{16b} @subsection Using Ada Expressions @@ -19625,7 +19433,7 @@ their packages, regardless of context. Where this causes ambiguity, For details on the supported Ada syntax, see @cite{Debugging with GDB}. @node Calling User-Defined Subprograms,Using the next Command in a Function,Using Ada Expressions,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution id7}@anchor{175}@anchor{gnat_ugn/gnat_and_program_execution calling-user-defined-subprograms}@anchor{176} +@anchor{gnat_ugn/gnat_and_program_execution id7}@anchor{16c}@anchor{gnat_ugn/gnat_and_program_execution calling-user-defined-subprograms}@anchor{16d} @subsection Calling User-Defined Subprograms @@ -19684,7 +19492,7 @@ elements directly from GDB, you can write a callable procedure that prints the elements in the desired format. @node Using the next Command in a Function,Stopping When Ada Exceptions Are Raised,Calling User-Defined Subprograms,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution using-the-next-command-in-a-function}@anchor{177}@anchor{gnat_ugn/gnat_and_program_execution id8}@anchor{178} +@anchor{gnat_ugn/gnat_and_program_execution using-the-next-command-in-a-function}@anchor{16e}@anchor{gnat_ugn/gnat_and_program_execution id8}@anchor{16f} @subsection Using the @emph{next} Command in a Function @@ -19707,7 +19515,7 @@ The value returned is always that from the first return statement that was stepped through. @node Stopping When Ada Exceptions Are Raised,Ada Tasks,Using the next Command in a Function,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution stopping-when-ada-exceptions-are-raised}@anchor{179}@anchor{gnat_ugn/gnat_and_program_execution id9}@anchor{17a} +@anchor{gnat_ugn/gnat_and_program_execution stopping-when-ada-exceptions-are-raised}@anchor{170}@anchor{gnat_ugn/gnat_and_program_execution id9}@anchor{171} @subsection Stopping When Ada Exceptions Are Raised @@ -19764,7 +19572,7 @@ argument, prints out only those exceptions whose name matches @emph{regexp}. @geindex Tasks (in gdb) @node Ada Tasks,Debugging Generic Units,Stopping When Ada Exceptions Are Raised,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution ada-tasks}@anchor{17b}@anchor{gnat_ugn/gnat_and_program_execution id10}@anchor{17c} +@anchor{gnat_ugn/gnat_and_program_execution ada-tasks}@anchor{172}@anchor{gnat_ugn/gnat_and_program_execution id10}@anchor{173} @subsection Ada Tasks @@ -19851,7 +19659,7 @@ see @cite{Debugging with GDB}. @geindex Generics @node Debugging Generic Units,Remote Debugging with gdbserver,Ada Tasks,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution debugging-generic-units}@anchor{17d}@anchor{gnat_ugn/gnat_and_program_execution id11}@anchor{17e} +@anchor{gnat_ugn/gnat_and_program_execution debugging-generic-units}@anchor{174}@anchor{gnat_ugn/gnat_and_program_execution id11}@anchor{175} @subsection Debugging Generic Units @@ -19910,7 +19718,7 @@ other units. @geindex Remote Debugging with gdbserver @node Remote Debugging with gdbserver,GNAT Abnormal Termination or Failure to Terminate,Debugging Generic Units,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution remote-debugging-with-gdbserver}@anchor{17f}@anchor{gnat_ugn/gnat_and_program_execution id12}@anchor{180} +@anchor{gnat_ugn/gnat_and_program_execution remote-debugging-with-gdbserver}@anchor{176}@anchor{gnat_ugn/gnat_and_program_execution id12}@anchor{177} @subsection Remote Debugging with gdbserver @@ -19968,7 +19776,7 @@ GNAT provides support for gdbserver on x86-linux, x86-windows and x86_64-linux. @geindex Abnormal Termination or Failure to Terminate @node GNAT Abnormal Termination or Failure to Terminate,Naming Conventions for GNAT Source Files,Remote Debugging with gdbserver,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution gnat-abnormal-termination-or-failure-to-terminate}@anchor{181}@anchor{gnat_ugn/gnat_and_program_execution id13}@anchor{182} +@anchor{gnat_ugn/gnat_and_program_execution gnat-abnormal-termination-or-failure-to-terminate}@anchor{178}@anchor{gnat_ugn/gnat_and_program_execution id13}@anchor{179} @subsection GNAT Abnormal Termination or Failure to Terminate @@ -20023,7 +19831,7 @@ Finally, you can start @code{gdb} directly on the @code{gnat1} executable. @code{gnat1} is the front-end of GNAT, and can be run independently (normally it is just called from @code{gcc}). You can use @code{gdb} on @code{gnat1} as you -would on a C program (but @ref{16d,,The GNAT Debugger GDB} for caveats). The +would on a C program (but @ref{164,,The GNAT Debugger GDB} for caveats). The @code{where} command is the first line of attack; the variable @code{lineno} (seen by @code{print lineno}), used by the second phase of @code{gnat1} and by the @code{gcc} backend, indicates the source line at @@ -20032,7 +19840,7 @@ the source file. @end itemize @node Naming Conventions for GNAT Source Files,Getting Internal Debugging Information,GNAT Abnormal Termination or Failure to Terminate,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution naming-conventions-for-gnat-source-files}@anchor{183}@anchor{gnat_ugn/gnat_and_program_execution id14}@anchor{184} +@anchor{gnat_ugn/gnat_and_program_execution naming-conventions-for-gnat-source-files}@anchor{17a}@anchor{gnat_ugn/gnat_and_program_execution id14}@anchor{17b} @subsection Naming Conventions for GNAT Source Files @@ -20113,7 +19921,7 @@ the other @code{.c} files are modifications of common @code{gcc} files. @end itemize @node Getting Internal Debugging Information,Stack Traceback,Naming Conventions for GNAT Source Files,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution id15}@anchor{185}@anchor{gnat_ugn/gnat_and_program_execution getting-internal-debugging-information}@anchor{186} +@anchor{gnat_ugn/gnat_and_program_execution id15}@anchor{17c}@anchor{gnat_ugn/gnat_and_program_execution getting-internal-debugging-information}@anchor{17d} @subsection Getting Internal Debugging Information @@ -20141,7 +19949,7 @@ are replaced with run-time calls. @geindex stack unwinding @node Stack Traceback,Pretty-Printers for the GNAT runtime,Getting Internal Debugging Information,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution stack-traceback}@anchor{187}@anchor{gnat_ugn/gnat_and_program_execution id16}@anchor{188} +@anchor{gnat_ugn/gnat_and_program_execution stack-traceback}@anchor{17e}@anchor{gnat_ugn/gnat_and_program_execution id16}@anchor{17f} @subsection Stack Traceback @@ -20170,7 +19978,7 @@ is enabled, and no exception is raised during program execution. @end menu @node Non-Symbolic Traceback,Symbolic Traceback,,Stack Traceback -@anchor{gnat_ugn/gnat_and_program_execution non-symbolic-traceback}@anchor{189}@anchor{gnat_ugn/gnat_and_program_execution id17}@anchor{18a} +@anchor{gnat_ugn/gnat_and_program_execution non-symbolic-traceback}@anchor{180}@anchor{gnat_ugn/gnat_and_program_execution id17}@anchor{181} @subsubsection Non-Symbolic Traceback @@ -20297,7 +20105,7 @@ From this traceback we can see that the exception was raised in @code{stb.adb} at line 5, which was reached from a procedure call in @code{stb.adb} at line 10, and so on. The @code{b~std.adb} is the binder file, which contains the call to the main program. -@ref{11c,,Running gnatbind}. The remaining entries are assorted runtime routines, +@ref{10d,,Running gnatbind}. The remaining entries are assorted runtime routines, and the output will vary from platform to platform. It is also possible to use @code{GDB} with these traceback addresses to debug @@ -20455,7 +20263,7 @@ need to be specified in C format, with a leading '0x'). @geindex symbolic @node Symbolic Traceback,,Non-Symbolic Traceback,Stack Traceback -@anchor{gnat_ugn/gnat_and_program_execution id18}@anchor{18b}@anchor{gnat_ugn/gnat_and_program_execution symbolic-traceback}@anchor{18c} +@anchor{gnat_ugn/gnat_and_program_execution id18}@anchor{182}@anchor{gnat_ugn/gnat_and_program_execution symbolic-traceback}@anchor{183} @subsubsection Symbolic Traceback @@ -20583,7 +20391,7 @@ which will also be printed if an unhandled exception terminates the program. @node Pretty-Printers for the GNAT runtime,,Stack Traceback,Running and Debugging Ada Programs -@anchor{gnat_ugn/gnat_and_program_execution id19}@anchor{18d}@anchor{gnat_ugn/gnat_and_program_execution pretty-printers-for-the-gnat-runtime}@anchor{18e} +@anchor{gnat_ugn/gnat_and_program_execution id19}@anchor{184}@anchor{gnat_ugn/gnat_and_program_execution pretty-printers-for-the-gnat-runtime}@anchor{185} @subsection Pretty-Printers for the GNAT runtime @@ -20690,7 +20498,7 @@ for more information. @geindex Profiling @node Profiling,Improving Performance,Running and Debugging Ada Programs,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution profiling}@anchor{25}@anchor{gnat_ugn/gnat_and_program_execution id20}@anchor{18f} +@anchor{gnat_ugn/gnat_and_program_execution profiling}@anchor{15d}@anchor{gnat_ugn/gnat_and_program_execution id20}@anchor{186} @section Profiling @@ -20706,7 +20514,7 @@ This section describes how to use the @code{gprof} profiler tool on Ada programs @end menu @node Profiling an Ada Program with gprof,,,Profiling -@anchor{gnat_ugn/gnat_and_program_execution id21}@anchor{190}@anchor{gnat_ugn/gnat_and_program_execution profiling-an-ada-program-with-gprof}@anchor{191} +@anchor{gnat_ugn/gnat_and_program_execution id21}@anchor{187}@anchor{gnat_ugn/gnat_and_program_execution profiling-an-ada-program-with-gprof}@anchor{188} @subsection Profiling an Ada Program with gprof @@ -20760,7 +20568,7 @@ to interpret the results. @end menu @node Compilation for profiling,Program execution,,Profiling an Ada Program with gprof -@anchor{gnat_ugn/gnat_and_program_execution id22}@anchor{192}@anchor{gnat_ugn/gnat_and_program_execution compilation-for-profiling}@anchor{193} +@anchor{gnat_ugn/gnat_and_program_execution id22}@anchor{189}@anchor{gnat_ugn/gnat_and_program_execution compilation-for-profiling}@anchor{18a} @subsubsection Compilation for profiling @@ -20788,7 +20596,7 @@ be profiled; if you need to profile your whole project, use the @code{-f} gnatmake switch to force full recompilation. @node Program execution,Running gprof,Compilation for profiling,Profiling an Ada Program with gprof -@anchor{gnat_ugn/gnat_and_program_execution program-execution}@anchor{194}@anchor{gnat_ugn/gnat_and_program_execution id23}@anchor{195} +@anchor{gnat_ugn/gnat_and_program_execution program-execution}@anchor{18b}@anchor{gnat_ugn/gnat_and_program_execution id23}@anchor{18c} @subsubsection Program execution @@ -20803,7 +20611,7 @@ generated in the directory where the program was launched from. If this file already exists, it will be overwritten. @node Running gprof,Interpretation of profiling results,Program execution,Profiling an Ada Program with gprof -@anchor{gnat_ugn/gnat_and_program_execution running-gprof}@anchor{196}@anchor{gnat_ugn/gnat_and_program_execution id24}@anchor{197} +@anchor{gnat_ugn/gnat_and_program_execution running-gprof}@anchor{18d}@anchor{gnat_ugn/gnat_and_program_execution id24}@anchor{18e} @subsubsection Running gprof @@ -20916,7 +20724,7 @@ may be given; only one @code{function_name} may be indicated with each @end table @node Interpretation of profiling results,,Running gprof,Profiling an Ada Program with gprof -@anchor{gnat_ugn/gnat_and_program_execution id25}@anchor{198}@anchor{gnat_ugn/gnat_and_program_execution interpretation-of-profiling-results}@anchor{199} +@anchor{gnat_ugn/gnat_and_program_execution id25}@anchor{18f}@anchor{gnat_ugn/gnat_and_program_execution interpretation-of-profiling-results}@anchor{190} @subsubsection Interpretation of profiling results @@ -20933,7 +20741,7 @@ and the subprograms that it calls. It also provides an estimate of the time spent in each of those callers/called subprograms. @node Improving Performance,Overflow Check Handling in GNAT,Profiling,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution improving-performance}@anchor{26}@anchor{gnat_ugn/gnat_and_program_execution id26}@anchor{168} +@anchor{gnat_ugn/gnat_and_program_execution improving-performance}@anchor{191}@anchor{gnat_ugn/gnat_and_program_execution id26}@anchor{15e} @section Improving Performance @@ -20954,7 +20762,7 @@ which can reduce the size of program executables. @end menu @node Performance Considerations,Text_IO Suggestions,,Improving Performance -@anchor{gnat_ugn/gnat_and_program_execution performance-considerations}@anchor{19a}@anchor{gnat_ugn/gnat_and_program_execution id27}@anchor{19b} +@anchor{gnat_ugn/gnat_and_program_execution performance-considerations}@anchor{192}@anchor{gnat_ugn/gnat_and_program_execution id27}@anchor{193} @subsection Performance Considerations @@ -21015,7 +20823,7 @@ some guidelines on debugging optimized code. @end menu @node Controlling Run-Time Checks,Use of Restrictions,,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id28}@anchor{19c}@anchor{gnat_ugn/gnat_and_program_execution controlling-run-time-checks}@anchor{19d} +@anchor{gnat_ugn/gnat_and_program_execution id28}@anchor{194}@anchor{gnat_ugn/gnat_and_program_execution controlling-run-time-checks}@anchor{195} @subsubsection Controlling Run-Time Checks @@ -21029,7 +20837,7 @@ necessary checking is done at compile time. @geindex -gnato (gcc) The gnat switch, @code{-gnatp} allows this default to be modified. See -@ref{f9,,Run-Time Checks}. +@ref{ea,,Run-Time Checks}. Our experience is that the default is suitable for most development purposes. @@ -21067,7 +20875,7 @@ remove checks) or @code{pragma Unsuppress} (to add back suppressed checks) in the program source. @node Use of Restrictions,Optimization Levels,Controlling Run-Time Checks,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id29}@anchor{19e}@anchor{gnat_ugn/gnat_and_program_execution use-of-restrictions}@anchor{19f} +@anchor{gnat_ugn/gnat_and_program_execution id29}@anchor{196}@anchor{gnat_ugn/gnat_and_program_execution use-of-restrictions}@anchor{197} @subsubsection Use of Restrictions @@ -21102,7 +20910,7 @@ that this also means that you can write code without worrying about the possibility of an immediate abort at any point. @node Optimization Levels,Debugging Optimized Code,Use of Restrictions,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id30}@anchor{1a0}@anchor{gnat_ugn/gnat_and_program_execution optimization-levels}@anchor{fc} +@anchor{gnat_ugn/gnat_and_program_execution id30}@anchor{198}@anchor{gnat_ugn/gnat_and_program_execution optimization-levels}@anchor{ed} @subsubsection Optimization Levels @@ -21183,7 +20991,7 @@ the slowest compilation time. Full optimization as in @code{-O2}; also uses more aggressive automatic inlining of subprograms within a unit -(@ref{10f,,Inlining of Subprograms}) and attempts to vectorize loops. +(@ref{100,,Inlining of Subprograms}) and attempts to vectorize loops. @end table @item @@ -21223,10 +21031,10 @@ levels. Note regarding the use of @code{-O3}: The use of this optimization level ought not to be automatically preferred over that of level @code{-O2}, since it often results in larger executables which may run more slowly. -See further discussion of this point in @ref{10f,,Inlining of Subprograms}. +See further discussion of this point in @ref{100,,Inlining of Subprograms}. @node Debugging Optimized Code,Inlining of Subprograms,Optimization Levels,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution debugging-optimized-code}@anchor{1a1}@anchor{gnat_ugn/gnat_and_program_execution id31}@anchor{1a2} +@anchor{gnat_ugn/gnat_and_program_execution debugging-optimized-code}@anchor{199}@anchor{gnat_ugn/gnat_and_program_execution id31}@anchor{19a} @subsubsection Debugging Optimized Code @@ -21354,7 +21162,7 @@ on the resulting executable, which removes both debugging information and global symbols. @node Inlining of Subprograms,Floating_Point_Operations,Debugging Optimized Code,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id32}@anchor{1a3}@anchor{gnat_ugn/gnat_and_program_execution inlining-of-subprograms}@anchor{10f} +@anchor{gnat_ugn/gnat_and_program_execution id32}@anchor{19b}@anchor{gnat_ugn/gnat_and_program_execution inlining-of-subprograms}@anchor{100} @subsubsection Inlining of Subprograms @@ -21493,7 +21301,7 @@ indeed you should use @code{-O3} only if tests show that it actually improves performance for your program. @node Floating_Point_Operations,Vectorization of loops,Inlining of Subprograms,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution floating-point-operations}@anchor{1a4}@anchor{gnat_ugn/gnat_and_program_execution id33}@anchor{1a5} +@anchor{gnat_ugn/gnat_and_program_execution floating-point-operations}@anchor{19c}@anchor{gnat_ugn/gnat_and_program_execution id33}@anchor{19d} @subsubsection Floating_Point_Operations @@ -21541,7 +21349,7 @@ so it is permissible to mix units compiled with and without these switches. @node Vectorization of loops,Other Optimization Switches,Floating_Point_Operations,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id34}@anchor{1a6}@anchor{gnat_ugn/gnat_and_program_execution vectorization-of-loops}@anchor{1a7} +@anchor{gnat_ugn/gnat_and_program_execution id34}@anchor{19e}@anchor{gnat_ugn/gnat_and_program_execution vectorization-of-loops}@anchor{19f} @subsubsection Vectorization of loops @@ -21692,7 +21500,7 @@ placed immediately within the loop will tell the compiler that it can safely omit the non-vectorized version of the loop as well as the run-time test. @node Other Optimization Switches,Optimization and Strict Aliasing,Vectorization of loops,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution other-optimization-switches}@anchor{1a8}@anchor{gnat_ugn/gnat_and_program_execution id35}@anchor{1a9} +@anchor{gnat_ugn/gnat_and_program_execution other-optimization-switches}@anchor{1a0}@anchor{gnat_ugn/gnat_and_program_execution id35}@anchor{1a1} @subsubsection Other Optimization Switches @@ -21709,7 +21517,7 @@ the @emph{Submodel Options} section in the @emph{Hardware Models and Configurati chapter of @cite{Using the GNU Compiler Collection (GCC)}. @node Optimization and Strict Aliasing,Aliased Variables and Optimization,Other Optimization Switches,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution optimization-and-strict-aliasing}@anchor{f3}@anchor{gnat_ugn/gnat_and_program_execution id36}@anchor{1aa} +@anchor{gnat_ugn/gnat_and_program_execution optimization-and-strict-aliasing}@anchor{e4}@anchor{gnat_ugn/gnat_and_program_execution id36}@anchor{1a2} @subsubsection Optimization and Strict Aliasing @@ -21949,7 +21757,7 @@ review any uses of unchecked conversion of access types, particularly if you are getting the warnings described above. @node Aliased Variables and Optimization,Atomic Variables and Optimization,Optimization and Strict Aliasing,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution id37}@anchor{1ab}@anchor{gnat_ugn/gnat_and_program_execution aliased-variables-and-optimization}@anchor{1ac} +@anchor{gnat_ugn/gnat_and_program_execution id37}@anchor{1a3}@anchor{gnat_ugn/gnat_and_program_execution aliased-variables-and-optimization}@anchor{1a4} @subsubsection Aliased Variables and Optimization @@ -22007,7 +21815,7 @@ This means that the above example will in fact "work" reliably, that is, it will produce the expected results. @node Atomic Variables and Optimization,Passive Task Optimization,Aliased Variables and Optimization,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution atomic-variables-and-optimization}@anchor{1ad}@anchor{gnat_ugn/gnat_and_program_execution id38}@anchor{1ae} +@anchor{gnat_ugn/gnat_and_program_execution atomic-variables-and-optimization}@anchor{1a5}@anchor{gnat_ugn/gnat_and_program_execution id38}@anchor{1a6} @subsubsection Atomic Variables and Optimization @@ -22088,7 +21896,7 @@ such synchronization code is not required, it may be useful to disable it. @node Passive Task Optimization,,Atomic Variables and Optimization,Performance Considerations -@anchor{gnat_ugn/gnat_and_program_execution passive-task-optimization}@anchor{1af}@anchor{gnat_ugn/gnat_and_program_execution id39}@anchor{1b0} +@anchor{gnat_ugn/gnat_and_program_execution passive-task-optimization}@anchor{1a7}@anchor{gnat_ugn/gnat_and_program_execution id39}@anchor{1a8} @subsubsection Passive Task Optimization @@ -22133,7 +21941,7 @@ that typically clients of the tasks who call entries, will not have to be modified, only the task definition itself. @node Text_IO Suggestions,Reducing Size of Executables with Unused Subprogram/Data Elimination,Performance Considerations,Improving Performance -@anchor{gnat_ugn/gnat_and_program_execution text-io-suggestions}@anchor{1b1}@anchor{gnat_ugn/gnat_and_program_execution id40}@anchor{1b2} +@anchor{gnat_ugn/gnat_and_program_execution text-io-suggestions}@anchor{1a9}@anchor{gnat_ugn/gnat_and_program_execution id40}@anchor{1aa} @subsection @code{Text_IO} Suggestions @@ -22156,7 +21964,7 @@ of the standard output file, or change the standard output file to be buffered using @code{Interfaces.C_Streams.setvbuf}. @node Reducing Size of Executables with Unused Subprogram/Data Elimination,,Text_IO Suggestions,Improving Performance -@anchor{gnat_ugn/gnat_and_program_execution id41}@anchor{1b3}@anchor{gnat_ugn/gnat_and_program_execution reducing-size-of-executables-with-unused-subprogram-data-elimination}@anchor{1b4} +@anchor{gnat_ugn/gnat_and_program_execution id41}@anchor{1ab}@anchor{gnat_ugn/gnat_and_program_execution reducing-size-of-executables-with-unused-subprogram-data-elimination}@anchor{1ac} @subsection Reducing Size of Executables with Unused Subprogram/Data Elimination @@ -22173,7 +21981,7 @@ your executable just by setting options at compilation time. @end menu @node About unused subprogram/data elimination,Compilation options,,Reducing Size of Executables with Unused Subprogram/Data Elimination -@anchor{gnat_ugn/gnat_and_program_execution id42}@anchor{1b5}@anchor{gnat_ugn/gnat_and_program_execution about-unused-subprogram-data-elimination}@anchor{1b6} +@anchor{gnat_ugn/gnat_and_program_execution id42}@anchor{1ad}@anchor{gnat_ugn/gnat_and_program_execution about-unused-subprogram-data-elimination}@anchor{1ae} @subsubsection About unused subprogram/data elimination @@ -22189,7 +21997,7 @@ architecture and on all cross platforms using the ELF binary file format. In both cases GNU binutils version 2.16 or later are required to enable it. @node Compilation options,Example of unused subprogram/data elimination,About unused subprogram/data elimination,Reducing Size of Executables with Unused Subprogram/Data Elimination -@anchor{gnat_ugn/gnat_and_program_execution id43}@anchor{1b7}@anchor{gnat_ugn/gnat_and_program_execution compilation-options}@anchor{1b8} +@anchor{gnat_ugn/gnat_and_program_execution id43}@anchor{1af}@anchor{gnat_ugn/gnat_and_program_execution compilation-options}@anchor{1b0} @subsubsection Compilation options @@ -22228,7 +22036,7 @@ The GNAT static library is now compiled with -ffunction-sections and and data of the GNAT library from your executable. @node Example of unused subprogram/data elimination,,Compilation options,Reducing Size of Executables with Unused Subprogram/Data Elimination -@anchor{gnat_ugn/gnat_and_program_execution example-of-unused-subprogram-data-elimination}@anchor{1b9}@anchor{gnat_ugn/gnat_and_program_execution id44}@anchor{1ba} +@anchor{gnat_ugn/gnat_and_program_execution example-of-unused-subprogram-data-elimination}@anchor{1b1}@anchor{gnat_ugn/gnat_and_program_execution id44}@anchor{1b2} @subsubsection Example of unused subprogram/data elimination @@ -22298,7 +22106,7 @@ appropriate options. @geindex Checks (overflow) @node Overflow Check Handling in GNAT,Performing Dimensionality Analysis in GNAT,Improving Performance,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution id45}@anchor{169}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{27} +@anchor{gnat_ugn/gnat_and_program_execution id45}@anchor{15f}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{1b3} @section Overflow Check Handling in GNAT @@ -22314,7 +22122,7 @@ This section explains how to control the handling of overflow checks. @end menu @node Background,Management of Overflows in GNAT,,Overflow Check Handling in GNAT -@anchor{gnat_ugn/gnat_and_program_execution id46}@anchor{1bb}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1bc} +@anchor{gnat_ugn/gnat_and_program_execution id46}@anchor{1b4}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1b5} @subsection Background @@ -22440,7 +22248,7 @@ exception raised because of the intermediate overflow (and we really would prefer this precondition to be considered True at run time). @node Management of Overflows in GNAT,Specifying the Desired Mode,Background,Overflow Check Handling in GNAT -@anchor{gnat_ugn/gnat_and_program_execution id47}@anchor{1bd}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1be} +@anchor{gnat_ugn/gnat_and_program_execution id47}@anchor{1b6}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1b7} @subsection Management of Overflows in GNAT @@ -22554,7 +22362,7 @@ out in the normal manner (with infinite values always failing all range checks). @node Specifying the Desired Mode,Default Settings,Management of Overflows in GNAT,Overflow Check Handling in GNAT -@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{f8}@anchor{gnat_ugn/gnat_and_program_execution id48}@anchor{1bf} +@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{e9}@anchor{gnat_ugn/gnat_and_program_execution id48}@anchor{1b8} @subsection Specifying the Desired Mode @@ -22678,7 +22486,7 @@ causing all intermediate operations to be computed using the base type (@code{STRICT} mode). @node Default Settings,Implementation Notes,Specifying the Desired Mode,Overflow Check Handling in GNAT -@anchor{gnat_ugn/gnat_and_program_execution id49}@anchor{1c0}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1c1} +@anchor{gnat_ugn/gnat_and_program_execution id49}@anchor{1b9}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1ba} @subsection Default Settings @@ -22725,7 +22533,7 @@ checking, but it has no effect on the method used for computing intermediate results. @node Implementation Notes,,Default Settings,Overflow Check Handling in GNAT -@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1c2}@anchor{gnat_ugn/gnat_and_program_execution id50}@anchor{1c3} +@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1bb}@anchor{gnat_ugn/gnat_and_program_execution id50}@anchor{1bc} @subsection Implementation Notes @@ -22773,7 +22581,7 @@ platforms for which @code{Long_Long_Integer} is 64-bits (nearly all GNAT platforms). @node Performing Dimensionality Analysis in GNAT,Stack Related Facilities,Overflow Check Handling in GNAT,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{28}@anchor{gnat_ugn/gnat_and_program_execution id51}@anchor{16a} +@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{1bd}@anchor{gnat_ugn/gnat_and_program_execution id51}@anchor{160} @section Performing Dimensionality Analysis in GNAT @@ -23160,7 +22968,7 @@ passing (the dimension vector for the actual parameter must be equal to the dimension vector for the formal parameter). @node Stack Related Facilities,Memory Management Issues,Performing Dimensionality Analysis in GNAT,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{29}@anchor{gnat_ugn/gnat_and_program_execution id52}@anchor{16b} +@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{1be}@anchor{gnat_ugn/gnat_and_program_execution id52}@anchor{161} @section Stack Related Facilities @@ -23176,7 +22984,7 @@ particular, it deals with dynamic and static stack usage measurements. @end menu @node Stack Overflow Checking,Static Stack Usage Analysis,,Stack Related Facilities -@anchor{gnat_ugn/gnat_and_program_execution id53}@anchor{1c4}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{f4} +@anchor{gnat_ugn/gnat_and_program_execution id53}@anchor{1bf}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{e5} @subsection Stack Overflow Checking @@ -23213,7 +23021,7 @@ If the space is exceeded, then a @code{Storage_Error} exception is raised. For declared tasks, the default stack size is defined by the GNAT runtime, whose size may be modified at bind time through the @code{-d} bind switch -(@ref{11f,,Switches for gnatbind}). Task specific stack sizes may be set using the +(@ref{110,,Switches for gnatbind}). Task specific stack sizes may be set using the @code{Storage_Size} pragma. For the environment task, the stack size is determined by the operating system. @@ -23221,7 +23029,7 @@ Consequently, to modify the size of the environment task please refer to your operating system documentation. @node Static Stack Usage Analysis,Dynamic Stack Usage Analysis,Stack Overflow Checking,Stack Related Facilities -@anchor{gnat_ugn/gnat_and_program_execution id54}@anchor{1c5}@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{f5} +@anchor{gnat_ugn/gnat_and_program_execution id54}@anchor{1c0}@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{e6} @subsection Static Stack Usage Analysis @@ -23270,7 +23078,7 @@ subprogram whose stack usage might be larger than the specified amount of bytes. The wording is in keeping with the qualifier documented above. @node Dynamic Stack Usage Analysis,,Static Stack Usage Analysis,Stack Related Facilities -@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{1c6}@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{122} +@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{1c1}@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{113} @subsection Dynamic Stack Usage Analysis @@ -23352,7 +23160,7 @@ The package @code{GNAT.Task_Stack_Usage} provides facilities to get stack-usage reports at run time. See its body for the details. @node Memory Management Issues,,Stack Related Facilities,GNAT and Program Execution -@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{16c}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{2a} +@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{162}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{1c2} @section Memory Management Issues @@ -23368,7 +23176,7 @@ incorrect uses of access values (including 'dangling references'). @end menu @node Some Useful Memory Pools,The GNAT Debug Pool Facility,,Memory Management Issues -@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c7}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1c8} +@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c3}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1c4} @subsection Some Useful Memory Pools @@ -23449,7 +23257,7 @@ for T1'Storage_Size use 10_000; @end quotation @node The GNAT Debug Pool Facility,,Some Useful Memory Pools,Memory Management Issues -@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c9}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1ca} +@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c5}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1c6} @subsection The GNAT Debug Pool Facility @@ -23612,7 +23420,7 @@ Debug Pool info: @c -- E.g. Ada |nbsp| 95 @node Platform-Specific Information,Example of Binder Output File,GNAT and Program Execution,Top -@anchor{gnat_ugn/platform_specific_information platform-specific-information}@anchor{d}@anchor{gnat_ugn/platform_specific_information doc}@anchor{1cb}@anchor{gnat_ugn/platform_specific_information id1}@anchor{1cc} +@anchor{gnat_ugn/platform_specific_information platform-specific-information}@anchor{d}@anchor{gnat_ugn/platform_specific_information doc}@anchor{1c7}@anchor{gnat_ugn/platform_specific_information id1}@anchor{1c8} @chapter Platform-Specific Information @@ -23630,7 +23438,7 @@ topics related to the GNAT implementation on Windows and Mac OS. @end menu @node Run-Time Libraries,Specifying a Run-Time Library,,Platform-Specific Information -@anchor{gnat_ugn/platform_specific_information id2}@anchor{1cd}@anchor{gnat_ugn/platform_specific_information run-time-libraries}@anchor{2b} +@anchor{gnat_ugn/platform_specific_information id2}@anchor{1c9}@anchor{gnat_ugn/platform_specific_information run-time-libraries}@anchor{1ca} @section Run-Time Libraries @@ -23691,7 +23499,7 @@ are supplied on various GNAT platforms. @end menu @node Summary of Run-Time Configurations,,,Run-Time Libraries -@anchor{gnat_ugn/platform_specific_information summary-of-run-time-configurations}@anchor{1ce}@anchor{gnat_ugn/platform_specific_information id3}@anchor{1cf} +@anchor{gnat_ugn/platform_specific_information summary-of-run-time-configurations}@anchor{1cb}@anchor{gnat_ugn/platform_specific_information id3}@anchor{1cc} @subsection Summary of Run-Time Configurations @@ -23791,7 +23599,7 @@ ZCX @node Specifying a Run-Time Library,GNU/Linux Topics,Run-Time Libraries,Platform-Specific Information -@anchor{gnat_ugn/platform_specific_information specifying-a-run-time-library}@anchor{1d0}@anchor{gnat_ugn/platform_specific_information id4}@anchor{1d1} +@anchor{gnat_ugn/platform_specific_information specifying-a-run-time-library}@anchor{1cd}@anchor{gnat_ugn/platform_specific_information id4}@anchor{1ce} @section Specifying a Run-Time Library @@ -23878,7 +23686,7 @@ Alternatively, you can specify @code{rts-sjlj/adainclude} in the file Selecting another run-time library temporarily can be achieved by using the @code{--RTS} switch, e.g., @code{--RTS=sjlj} -@anchor{gnat_ugn/platform_specific_information choosing-the-scheduling-policy}@anchor{1d2} +@anchor{gnat_ugn/platform_specific_information choosing-the-scheduling-policy}@anchor{1cf} @geindex SCHED_FIFO scheduling policy @geindex SCHED_RR scheduling policy @@ -23891,7 +23699,7 @@ achieved by using the @code{--RTS} switch, e.g., @code{--RTS=sjlj} @end menu @node Choosing the Scheduling Policy,,,Specifying a Run-Time Library -@anchor{gnat_ugn/platform_specific_information id5}@anchor{1d3} +@anchor{gnat_ugn/platform_specific_information id5}@anchor{1d0} @subsection Choosing the Scheduling Policy @@ -23950,7 +23758,7 @@ Program_Error. @geindex GNU/Linux @node GNU/Linux Topics,Microsoft Windows Topics,Specifying a Run-Time Library,Platform-Specific Information -@anchor{gnat_ugn/platform_specific_information id6}@anchor{1d4}@anchor{gnat_ugn/platform_specific_information gnu-linux-topics}@anchor{1d5} +@anchor{gnat_ugn/platform_specific_information id6}@anchor{1d1}@anchor{gnat_ugn/platform_specific_information gnu-linux-topics}@anchor{1d2} @section GNU/Linux Topics @@ -23962,7 +23770,7 @@ This section describes topics that are specific to GNU/Linux platforms. @end menu @node Required Packages on GNU/Linux,,,GNU/Linux Topics -@anchor{gnat_ugn/platform_specific_information id7}@anchor{1d6}@anchor{gnat_ugn/platform_specific_information required-packages-on-gnu-linux}@anchor{1d7} +@anchor{gnat_ugn/platform_specific_information id7}@anchor{1d3}@anchor{gnat_ugn/platform_specific_information required-packages-on-gnu-linux}@anchor{1d4} @subsection Required Packages on GNU/Linux @@ -23998,7 +23806,7 @@ for those packages. @geindex Windows @node Microsoft Windows Topics,Mac OS Topics,GNU/Linux Topics,Platform-Specific Information -@anchor{gnat_ugn/platform_specific_information microsoft-windows-topics}@anchor{2c}@anchor{gnat_ugn/platform_specific_information id8}@anchor{1d8} +@anchor{gnat_ugn/platform_specific_information microsoft-windows-topics}@anchor{1d5}@anchor{gnat_ugn/platform_specific_information id8}@anchor{1d6} @section Microsoft Windows Topics @@ -24019,7 +23827,7 @@ platforms. @end menu @node Using GNAT on Windows,Using a network installation of GNAT,,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information using-gnat-on-windows}@anchor{1d9}@anchor{gnat_ugn/platform_specific_information id9}@anchor{1da} +@anchor{gnat_ugn/platform_specific_information using-gnat-on-windows}@anchor{1d7}@anchor{gnat_ugn/platform_specific_information id9}@anchor{1d8} @subsection Using GNAT on Windows @@ -24096,7 +23904,7 @@ uninstall or integrate different GNAT products. @end itemize @node Using a network installation of GNAT,CONSOLE and WINDOWS subsystems,Using GNAT on Windows,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information id10}@anchor{1db}@anchor{gnat_ugn/platform_specific_information using-a-network-installation-of-gnat}@anchor{1dc} +@anchor{gnat_ugn/platform_specific_information id10}@anchor{1d9}@anchor{gnat_ugn/platform_specific_information using-a-network-installation-of-gnat}@anchor{1da} @subsection Using a network installation of GNAT @@ -24123,7 +23931,7 @@ transfer of large amounts of data across the network and will likely cause serious performance penalty. @node CONSOLE and WINDOWS subsystems,Temporary Files,Using a network installation of GNAT,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information id11}@anchor{1dd}@anchor{gnat_ugn/platform_specific_information console-and-windows-subsystems}@anchor{1de} +@anchor{gnat_ugn/platform_specific_information id11}@anchor{1db}@anchor{gnat_ugn/platform_specific_information console-and-windows-subsystems}@anchor{1dc} @subsection CONSOLE and WINDOWS subsystems @@ -24148,7 +23956,7 @@ $ gnatmake winprog -largs -mwindows @end quotation @node Temporary Files,Disabling Command Line Argument Expansion,CONSOLE and WINDOWS subsystems,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information id12}@anchor{1df}@anchor{gnat_ugn/platform_specific_information temporary-files}@anchor{1e0} +@anchor{gnat_ugn/platform_specific_information id12}@anchor{1dd}@anchor{gnat_ugn/platform_specific_information temporary-files}@anchor{1de} @subsection Temporary Files @@ -24187,7 +23995,7 @@ environments where you may not have write access to some directories. @node Disabling Command Line Argument Expansion,Windows Socket Timeouts,Temporary Files,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information disabling-command-line-argument-expansion}@anchor{1e1} +@anchor{gnat_ugn/platform_specific_information disabling-command-line-argument-expansion}@anchor{1df} @subsection Disabling Command Line Argument Expansion @@ -24258,7 +24066,7 @@ Ada.Command_Line.Argument (1) -> "'*.txt'" @end example @node Windows Socket Timeouts,Mixed-Language Programming on Windows,Disabling Command Line Argument Expansion,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information windows-socket-timeouts}@anchor{1e2} +@anchor{gnat_ugn/platform_specific_information windows-socket-timeouts}@anchor{1e0} @subsection Windows Socket Timeouts @@ -24304,7 +24112,7 @@ shorter than 500 ms is needed on these Windows versions, a call to Check_Selector should be added before any socket read or write operations. @node Mixed-Language Programming on Windows,Windows Specific Add-Ons,Windows Socket Timeouts,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information id13}@anchor{1e3}@anchor{gnat_ugn/platform_specific_information mixed-language-programming-on-windows}@anchor{1e4} +@anchor{gnat_ugn/platform_specific_information id13}@anchor{1e1}@anchor{gnat_ugn/platform_specific_information mixed-language-programming-on-windows}@anchor{1e2} @subsection Mixed-Language Programming on Windows @@ -24326,17 +24134,17 @@ to use the Microsoft tools for your C++ code, you have two choices: Encapsulate your C++ code in a DLL to be linked with your Ada application. In this case, use the Microsoft or whatever environment to build the DLL and use GNAT to build your executable -(@ref{1e5,,Using DLLs with GNAT}). +(@ref{1e3,,Using DLLs with GNAT}). @item Or you can encapsulate your Ada code in a DLL to be linked with the other part of your application. In this case, use GNAT to build the DLL -(@ref{1e6,,Building DLLs with GNAT Project files}) and use the Microsoft +(@ref{1e4,,Building DLLs with GNAT Project files}) and use the Microsoft or whatever environment to build your executable. @end itemize In addition to the description about C main in -@ref{44,,Mixed Language Programming} section, if the C main uses a +@ref{2c,,Mixed Language Programming} section, if the C main uses a stand-alone library it is required on x86-windows to setup the SEH context. For this the C main must looks like this: @@ -24388,7 +24196,7 @@ native SEH support is used. @end menu @node Windows Calling Conventions,Introduction to Dynamic Link Libraries DLLs,,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information windows-calling-conventions}@anchor{1e7}@anchor{gnat_ugn/platform_specific_information id14}@anchor{1e8} +@anchor{gnat_ugn/platform_specific_information windows-calling-conventions}@anchor{1e5}@anchor{gnat_ugn/platform_specific_information id14}@anchor{1e6} @subsubsection Windows Calling Conventions @@ -24433,7 +24241,7 @@ are available for Windows: @end menu @node C Calling Convention,Stdcall Calling Convention,,Windows Calling Conventions -@anchor{gnat_ugn/platform_specific_information c-calling-convention}@anchor{1e9}@anchor{gnat_ugn/platform_specific_information id15}@anchor{1ea} +@anchor{gnat_ugn/platform_specific_information c-calling-convention}@anchor{1e7}@anchor{gnat_ugn/platform_specific_information id15}@anchor{1e8} @subsubsection @code{C} Calling Convention @@ -24475,10 +24283,10 @@ is missing, as in the above example, this parameter is set to be the When importing a variable defined in C, you should always use the @code{C} calling convention unless the object containing the variable is part of a DLL (in which case you should use the @code{Stdcall} calling -convention, @ref{1eb,,Stdcall Calling Convention}). +convention, @ref{1e9,,Stdcall Calling Convention}). @node Stdcall Calling Convention,Win32 Calling Convention,C Calling Convention,Windows Calling Conventions -@anchor{gnat_ugn/platform_specific_information stdcall-calling-convention}@anchor{1eb}@anchor{gnat_ugn/platform_specific_information id16}@anchor{1ec} +@anchor{gnat_ugn/platform_specific_information stdcall-calling-convention}@anchor{1e9}@anchor{gnat_ugn/platform_specific_information id16}@anchor{1ea} @subsubsection @code{Stdcall} Calling Convention @@ -24575,7 +24383,7 @@ Note that to ease building cross-platform bindings this convention will be handled as a @code{C} calling convention on non-Windows platforms. @node Win32 Calling Convention,DLL Calling Convention,Stdcall Calling Convention,Windows Calling Conventions -@anchor{gnat_ugn/platform_specific_information win32-calling-convention}@anchor{1ed}@anchor{gnat_ugn/platform_specific_information id17}@anchor{1ee} +@anchor{gnat_ugn/platform_specific_information win32-calling-convention}@anchor{1eb}@anchor{gnat_ugn/platform_specific_information id17}@anchor{1ec} @subsubsection @code{Win32} Calling Convention @@ -24583,7 +24391,7 @@ This convention, which is GNAT-specific is fully equivalent to the @code{Stdcall} calling convention described above. @node DLL Calling Convention,,Win32 Calling Convention,Windows Calling Conventions -@anchor{gnat_ugn/platform_specific_information id18}@anchor{1ef}@anchor{gnat_ugn/platform_specific_information dll-calling-convention}@anchor{1f0} +@anchor{gnat_ugn/platform_specific_information id18}@anchor{1ed}@anchor{gnat_ugn/platform_specific_information dll-calling-convention}@anchor{1ee} @subsubsection @code{DLL} Calling Convention @@ -24591,7 +24399,7 @@ This convention, which is GNAT-specific is fully equivalent to the @code{Stdcall} calling convention described above. @node Introduction to Dynamic Link Libraries DLLs,Using DLLs with GNAT,Windows Calling Conventions,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id19}@anchor{1f1}@anchor{gnat_ugn/platform_specific_information introduction-to-dynamic-link-libraries-dlls}@anchor{1f2} +@anchor{gnat_ugn/platform_specific_information id19}@anchor{1ef}@anchor{gnat_ugn/platform_specific_information introduction-to-dynamic-link-libraries-dlls}@anchor{1f0} @subsubsection Introduction to Dynamic Link Libraries (DLLs) @@ -24675,10 +24483,10 @@ As a side note, an interesting difference between Microsoft DLLs and Unix shared libraries, is the fact that on most Unix systems all public routines are exported by default in a Unix shared library, while under Windows it is possible (but not required) to list exported routines in -a definition file (see @ref{1f3,,The Definition File}). +a definition file (see @ref{1f1,,The Definition File}). @node Using DLLs with GNAT,Building DLLs with GNAT Project files,Introduction to Dynamic Link Libraries DLLs,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id20}@anchor{1f4}@anchor{gnat_ugn/platform_specific_information using-dlls-with-gnat}@anchor{1e5} +@anchor{gnat_ugn/platform_specific_information id20}@anchor{1f2}@anchor{gnat_ugn/platform_specific_information using-dlls-with-gnat}@anchor{1e3} @subsubsection Using DLLs with GNAT @@ -24769,7 +24577,7 @@ example a fictitious DLL called @code{API.dll}. @end menu @node Creating an Ada Spec for the DLL Services,Creating an Import Library,,Using DLLs with GNAT -@anchor{gnat_ugn/platform_specific_information id21}@anchor{1f5}@anchor{gnat_ugn/platform_specific_information creating-an-ada-spec-for-the-dll-services}@anchor{1f6} +@anchor{gnat_ugn/platform_specific_information id21}@anchor{1f3}@anchor{gnat_ugn/platform_specific_information creating-an-ada-spec-for-the-dll-services}@anchor{1f4} @subsubsection Creating an Ada Spec for the DLL Services @@ -24809,7 +24617,7 @@ end API; @end quotation @node Creating an Import Library,,Creating an Ada Spec for the DLL Services,Using DLLs with GNAT -@anchor{gnat_ugn/platform_specific_information id22}@anchor{1f7}@anchor{gnat_ugn/platform_specific_information creating-an-import-library}@anchor{1f8} +@anchor{gnat_ugn/platform_specific_information id22}@anchor{1f5}@anchor{gnat_ugn/platform_specific_information creating-an-import-library}@anchor{1f6} @subsubsection Creating an Import Library @@ -24823,7 +24631,7 @@ as in this case it is possible to link directly against the DLL. Otherwise read on. @geindex Definition file -@anchor{gnat_ugn/platform_specific_information the-definition-file}@anchor{1f3} +@anchor{gnat_ugn/platform_specific_information the-definition-file}@anchor{1f1} @subsubheading The Definition File @@ -24871,17 +24679,17 @@ EXPORTS @end table Note that you must specify the correct suffix (@code{@@@emph{nn}}) -(see @ref{1e7,,Windows Calling Conventions}) for a Stdcall +(see @ref{1e5,,Windows Calling Conventions}) for a Stdcall calling convention function in the exported symbols list. There can actually be other sections in a definition file, but these sections are not relevant to the discussion at hand. -@anchor{gnat_ugn/platform_specific_information create-def-file-automatically}@anchor{1f9} +@anchor{gnat_ugn/platform_specific_information create-def-file-automatically}@anchor{1f7} @subsubheading Creating a Definition File Automatically You can automatically create the definition file @code{API.def} -(see @ref{1f3,,The Definition File}) from a DLL. +(see @ref{1f1,,The Definition File}) from a DLL. For that use the @code{dlltool} program as follows: @quotation @@ -24891,7 +24699,7 @@ $ dlltool API.dll -z API.def --export-all-symbols @end example Note that if some routines in the DLL have the @code{Stdcall} convention -(@ref{1e7,,Windows Calling Conventions}) with stripped @code{@@@emph{nn}} +(@ref{1e5,,Windows Calling Conventions}) with stripped @code{@@@emph{nn}} suffix then you'll have to edit @code{api.def} to add it, and specify @code{-k} to @code{gnatdll} when creating the import library. @@ -24915,13 +24723,13 @@ tells you what symbol is expected. You just have to go back to the definition file and add the right suffix. @end itemize @end quotation -@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{1fa} +@anchor{gnat_ugn/platform_specific_information gnat-style-import-library}@anchor{1f8} @subsubheading GNAT-Style Import Library To create a static import library from @code{API.dll} with the GNAT tools you should create the .def file, then use @code{gnatdll} tool -(see @ref{1fb,,Using gnatdll}) as follows: +(see @ref{1f9,,Using gnatdll}) as follows: @quotation @@ -24937,15 +24745,15 @@ definition file name is @code{xyz.def}, the import library name will be @code{libxyz.a}. Note that in the previous example option @code{-e} could have been removed because the name of the definition file (before the @code{.def} suffix) is the same as the name of the -DLL (@ref{1fb,,Using gnatdll} for more information about @code{gnatdll}). +DLL (@ref{1f9,,Using gnatdll} for more information about @code{gnatdll}). @end quotation -@anchor{gnat_ugn/platform_specific_information msvs-style-import-library}@anchor{1fc} +@anchor{gnat_ugn/platform_specific_information msvs-style-import-library}@anchor{1fa} @subsubheading Microsoft-Style Import Library A Microsoft import library is needed only if you plan to make an Ada DLL available to applications developed with Microsoft -tools (@ref{1e4,,Mixed-Language Programming on Windows}). +tools (@ref{1e2,,Mixed-Language Programming on Windows}). To create a Microsoft-style import library for @code{API.dll} you should create the .def file, then build the actual import library using @@ -24969,7 +24777,7 @@ See the Microsoft documentation for further details about the usage of @end quotation @node Building DLLs with GNAT Project files,Building DLLs with GNAT,Using DLLs with GNAT,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id23}@anchor{1fd}@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{1e6} +@anchor{gnat_ugn/platform_specific_information id23}@anchor{1fb}@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat-project-files}@anchor{1e4} @subsubsection Building DLLs with GNAT Project files @@ -24985,7 +24793,7 @@ when inside the @code{DllMain} routine which is used for auto-initialization of shared libraries, so it is not possible to have library level tasks in SALs. @node Building DLLs with GNAT,Building DLLs with gnatdll,Building DLLs with GNAT Project files,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{1fe}@anchor{gnat_ugn/platform_specific_information id24}@anchor{1ff} +@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnat}@anchor{1fc}@anchor{gnat_ugn/platform_specific_information id24}@anchor{1fd} @subsubsection Building DLLs with GNAT @@ -25016,7 +24824,7 @@ $ gcc -shared -shared-libgcc -o api.dll obj1.o obj2.o ... It is important to note that in this case all symbols found in the object files are automatically exported. It is possible to restrict the set of symbols to export by passing to @code{gcc} a definition -file (see @ref{1f3,,The Definition File}). +file (see @ref{1f1,,The Definition File}). For example: @example @@ -25054,7 +24862,7 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI @end quotation @node Building DLLs with gnatdll,Ada DLLs and Finalization,Building DLLs with GNAT,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{200}@anchor{gnat_ugn/platform_specific_information id25}@anchor{201} +@anchor{gnat_ugn/platform_specific_information building-dlls-with-gnatdll}@anchor{1fe}@anchor{gnat_ugn/platform_specific_information id25}@anchor{1ff} @subsubsection Building DLLs with gnatdll @@ -25062,8 +24870,8 @@ $ gnatmake main -Iapilib -bargs -shared -largs -Lapilib -lAPI @geindex building Note that it is preferred to use GNAT Project files -(@ref{1e6,,Building DLLs with GNAT Project files}) or the built-in GNAT -DLL support (@ref{1fe,,Building DLLs with GNAT}) or to build DLLs. +(@ref{1e4,,Building DLLs with GNAT Project files}) or the built-in GNAT +DLL support (@ref{1fc,,Building DLLs with GNAT}) or to build DLLs. This section explains how to build DLLs containing Ada code using @code{gnatdll}. These DLLs will be referred to as Ada DLLs in the @@ -25079,20 +24887,20 @@ non-Ada applications are as follows: You need to mark each Ada entity exported by the DLL with a @code{C} or @code{Stdcall} calling convention to avoid any Ada name mangling for the entities exported by the DLL -(see @ref{202,,Exporting Ada Entities}). You can +(see @ref{200,,Exporting Ada Entities}). You can skip this step if you plan to use the Ada DLL only from Ada applications. @item Your Ada code must export an initialization routine which calls the routine @code{adainit} generated by @code{gnatbind} to perform the elaboration of -the Ada code in the DLL (@ref{203,,Ada DLLs and Elaboration}). The initialization +the Ada code in the DLL (@ref{201,,Ada DLLs and Elaboration}). The initialization routine exported by the Ada DLL must be invoked by the clients of the DLL to initialize the DLL. @item When useful, the DLL should also export a finalization routine which calls routine @code{adafinal} generated by @code{gnatbind} to perform the -finalization of the Ada code in the DLL (@ref{204,,Ada DLLs and Finalization}). +finalization of the Ada code in the DLL (@ref{202,,Ada DLLs and Finalization}). The finalization routine exported by the Ada DLL must be invoked by the clients of the DLL when the DLL services are no further needed. @@ -25102,11 +24910,11 @@ of the programming languages to which you plan to make the DLL available. @item You must provide a definition file listing the exported entities -(@ref{1f3,,The Definition File}). +(@ref{1f1,,The Definition File}). @item Finally you must use @code{gnatdll} to produce the DLL and the import -library (@ref{1fb,,Using gnatdll}). +library (@ref{1f9,,Using gnatdll}). @end itemize Note that a relocatable DLL stripped using the @code{strip} @@ -25126,7 +24934,7 @@ chapter of the @emph{GPRbuild User's Guide}. @end menu @node Limitations When Using Ada DLLs from Ada,Exporting Ada Entities,,Building DLLs with gnatdll -@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{205} +@anchor{gnat_ugn/platform_specific_information limitations-when-using-ada-dlls-from-ada}@anchor{203} @subsubsection Limitations When Using Ada DLLs from Ada @@ -25147,7 +24955,7 @@ It is completely safe to exchange plain elementary, array or record types, Windows object handles, etc. @node Exporting Ada Entities,Ada DLLs and Elaboration,Limitations When Using Ada DLLs from Ada,Building DLLs with gnatdll -@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{202}@anchor{gnat_ugn/platform_specific_information id26}@anchor{206} +@anchor{gnat_ugn/platform_specific_information exporting-ada-entities}@anchor{200}@anchor{gnat_ugn/platform_specific_information id26}@anchor{204} @subsubsection Exporting Ada Entities @@ -25247,10 +25055,10 @@ end API; Note that if you do not export the Ada entities with a @code{C} or @code{Stdcall} convention you will have to provide the mangled Ada names in the definition file of the Ada DLL -(@ref{207,,Creating the Definition File}). +(@ref{205,,Creating the Definition File}). @node Ada DLLs and Elaboration,,Exporting Ada Entities,Building DLLs with gnatdll -@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{203}@anchor{gnat_ugn/platform_specific_information id27}@anchor{208} +@anchor{gnat_ugn/platform_specific_information ada-dlls-and-elaboration}@anchor{201}@anchor{gnat_ugn/platform_specific_information id27}@anchor{206} @subsubsection Ada DLLs and Elaboration @@ -25265,10 +25073,10 @@ To achieve this you must export an initialization routine (@code{Initialize_API} in the previous example), which must be invoked before using any of the DLL services. This elaboration routine must call the Ada elaboration routine @code{adainit} generated by the GNAT binder -(@ref{b4,,Binding with Non-Ada Main Programs}). See the body of +(@ref{a0,,Binding with Non-Ada Main Programs}). See the body of @code{Initialize_Api} for an example. Note that the GNAT binder is automatically invoked during the DLL build process by the @code{gnatdll} -tool (@ref{1fb,,Using gnatdll}). +tool (@ref{1f9,,Using gnatdll}). When a DLL is loaded, Windows systematically invokes a routine called @code{DllMain}. It would therefore be possible to call @code{adainit} @@ -25281,7 +25089,7 @@ time), which means that the GNAT run-time will deadlock waiting for the newly created task to complete its initialization. @node Ada DLLs and Finalization,Creating a Spec for Ada DLLs,Building DLLs with gnatdll,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id28}@anchor{209}@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{204} +@anchor{gnat_ugn/platform_specific_information id28}@anchor{207}@anchor{gnat_ugn/platform_specific_information ada-dlls-and-finalization}@anchor{202} @subsubsection Ada DLLs and Finalization @@ -25292,14 +25100,14 @@ invoke the DLL finalization routine, if available. The DLL finalization routine is in charge of releasing all resources acquired by the DLL. In the case of the Ada code contained in the DLL, this is achieved by calling routine @code{adafinal} generated by the GNAT binder -(@ref{b4,,Binding with Non-Ada Main Programs}). +(@ref{a0,,Binding with Non-Ada Main Programs}). See the body of @code{Finalize_Api} for an example. As already pointed out the GNAT binder is automatically invoked during the DLL build process by the @code{gnatdll} tool -(@ref{1fb,,Using gnatdll}). +(@ref{1f9,,Using gnatdll}). @node Creating a Spec for Ada DLLs,GNAT and Windows Resources,Ada DLLs and Finalization,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id29}@anchor{20a}@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{20b} +@anchor{gnat_ugn/platform_specific_information id29}@anchor{208}@anchor{gnat_ugn/platform_specific_information creating-a-spec-for-ada-dlls}@anchor{209} @subsubsection Creating a Spec for Ada DLLs @@ -25357,7 +25165,7 @@ end API; @end menu @node Creating the Definition File,Using gnatdll,,Creating a Spec for Ada DLLs -@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{207}@anchor{gnat_ugn/platform_specific_information id30}@anchor{20c} +@anchor{gnat_ugn/platform_specific_information creating-the-definition-file}@anchor{205}@anchor{gnat_ugn/platform_specific_information id30}@anchor{20a} @subsubsection Creating the Definition File @@ -25393,7 +25201,7 @@ EXPORTS @end quotation @node Using gnatdll,,Creating the Definition File,Creating a Spec for Ada DLLs -@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{1fb}@anchor{gnat_ugn/platform_specific_information id31}@anchor{20d} +@anchor{gnat_ugn/platform_specific_information using-gnatdll}@anchor{1f9}@anchor{gnat_ugn/platform_specific_information id31}@anchor{20b} @subsubsection Using @code{gnatdll} @@ -25491,7 +25299,7 @@ Help mode. Displays @code{gnatdll} switch usage information. Direct @code{gnatdll} to search the @code{dir} directory for source and object files needed to build the DLL. -(@ref{89,,Search Paths and the Run-Time Library (RTL)}). +(@ref{73,,Search Paths and the Run-Time Library (RTL)}). @geindex -k (gnatdll) @@ -25604,7 +25412,7 @@ asks @code{gnatlink} to generate the routines @code{DllMain} and is loaded into memory. @item -@code{gnatdll} uses @code{dlltool} (see @ref{20e,,Using dlltool}) to build the +@code{gnatdll} uses @code{dlltool} (see @ref{20c,,Using dlltool}) to build the export table (@code{api.exp}). The export table contains the relocation information in a form which can be used during the final link to ensure that the Windows loader is able to place the DLL anywhere in memory. @@ -25643,7 +25451,7 @@ $ gnatbind -n api $ gnatlink api api.exp -o api.dll -mdll @end example @end itemize -@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{20e} +@anchor{gnat_ugn/platform_specific_information using-dlltool}@anchor{20c} @subsubheading Using @code{dlltool} @@ -25702,7 +25510,7 @@ DLL in the static import library generated by @code{dlltool} with switch @item @code{-k} Kill @code{@@@emph{nn}} from exported names -(@ref{1e7,,Windows Calling Conventions} +(@ref{1e5,,Windows Calling Conventions} for a discussion about @code{Stdcall}-style symbols. @end table @@ -25758,7 +25566,7 @@ Use @code{assembler-name} as the assembler. The default is @code{as}. @end table @node GNAT and Windows Resources,Using GNAT DLLs from Microsoft Visual Studio Applications,Creating a Spec for Ada DLLs,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{20f}@anchor{gnat_ugn/platform_specific_information id32}@anchor{210} +@anchor{gnat_ugn/platform_specific_information gnat-and-windows-resources}@anchor{20d}@anchor{gnat_ugn/platform_specific_information id32}@anchor{20e} @subsubsection GNAT and Windows Resources @@ -25853,7 +25661,7 @@ the corresponding Microsoft documentation. @end menu @node Building Resources,Compiling Resources,,GNAT and Windows Resources -@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{211}@anchor{gnat_ugn/platform_specific_information id33}@anchor{212} +@anchor{gnat_ugn/platform_specific_information building-resources}@anchor{20f}@anchor{gnat_ugn/platform_specific_information id33}@anchor{210} @subsubsection Building Resources @@ -25873,7 +25681,7 @@ complete description of the resource script language can be found in the Microsoft documentation. @node Compiling Resources,Using Resources,Building Resources,GNAT and Windows Resources -@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{213}@anchor{gnat_ugn/platform_specific_information id34}@anchor{214} +@anchor{gnat_ugn/platform_specific_information compiling-resources}@anchor{211}@anchor{gnat_ugn/platform_specific_information id34}@anchor{212} @subsubsection Compiling Resources @@ -25915,7 +25723,7 @@ $ windres -i myres.res -o myres.o @end quotation @node Using Resources,,Compiling Resources,GNAT and Windows Resources -@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{215}@anchor{gnat_ugn/platform_specific_information id35}@anchor{216} +@anchor{gnat_ugn/platform_specific_information using-resources}@anchor{213}@anchor{gnat_ugn/platform_specific_information id35}@anchor{214} @subsubsection Using Resources @@ -25935,7 +25743,7 @@ $ gnatmake myprog -largs myres.o @end quotation @node Using GNAT DLLs from Microsoft Visual Studio Applications,Debugging a DLL,GNAT and Windows Resources,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information using-gnat-dll-from-msvs}@anchor{217}@anchor{gnat_ugn/platform_specific_information using-gnat-dlls-from-microsoft-visual-studio-applications}@anchor{218} +@anchor{gnat_ugn/platform_specific_information using-gnat-dll-from-msvs}@anchor{215}@anchor{gnat_ugn/platform_specific_information using-gnat-dlls-from-microsoft-visual-studio-applications}@anchor{216} @subsubsection Using GNAT DLLs from Microsoft Visual Studio Applications @@ -25969,7 +25777,7 @@ $ gprbuild -p mylib.gpr @item Produce a .def file for the symbols you need to interface with, either by hand or automatically with possibly some manual adjustments -(see @ref{1f9,,Creating Definition File Automatically}): +(see @ref{1f7,,Creating Definition File Automatically}): @end enumerate @quotation @@ -25986,7 +25794,7 @@ $ dlltool libmylib.dll -z libmylib.def --export-all-symbols Make sure that MSVS command-line tools are accessible on the path. @item -Create the Microsoft-style import library (see @ref{1fc,,MSVS-Style Import Library}): +Create the Microsoft-style import library (see @ref{1fa,,MSVS-Style Import Library}): @end enumerate @quotation @@ -26028,7 +25836,7 @@ or copy the DLL into into the directory containing the .exe. @end enumerate @node Debugging a DLL,Setting Stack Size from gnatlink,Using GNAT DLLs from Microsoft Visual Studio Applications,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information id36}@anchor{219}@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{21a} +@anchor{gnat_ugn/platform_specific_information id36}@anchor{217}@anchor{gnat_ugn/platform_specific_information debugging-a-dll}@anchor{218} @subsubsection Debugging a DLL @@ -26066,7 +25874,7 @@ tools suite used to build the DLL. @end menu @node Program and DLL Both Built with GCC/GNAT,Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Debugging a DLL -@anchor{gnat_ugn/platform_specific_information id37}@anchor{21b}@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{21c} +@anchor{gnat_ugn/platform_specific_information id37}@anchor{219}@anchor{gnat_ugn/platform_specific_information program-and-dll-both-built-with-gcc-gnat}@anchor{21a} @subsubsection Program and DLL Both Built with GCC/GNAT @@ -26076,7 +25884,7 @@ the process. Let's suppose here that the main procedure is named @code{ada_main} and that in the DLL there is an entry point named @code{ada_dll}. -The DLL (@ref{1f2,,Introduction to Dynamic Link Libraries (DLLs)}) and +The DLL (@ref{1f0,,Introduction to Dynamic Link Libraries (DLLs)}) and program must have been built with the debugging information (see GNAT -g switch). Here are the step-by-step instructions for debugging it: @@ -26113,10 +25921,10 @@ Set a breakpoint inside the DLL At this stage a breakpoint is set inside the DLL. From there on you can use the standard approach to debug the whole program -(@ref{24,,Running and Debugging Ada Programs}). +(@ref{163,,Running and Debugging Ada Programs}). @node Program Built with Foreign Tools and DLL Built with GCC/GNAT,,Program and DLL Both Built with GCC/GNAT,Debugging a DLL -@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{21d}@anchor{gnat_ugn/platform_specific_information id38}@anchor{21e} +@anchor{gnat_ugn/platform_specific_information program-built-with-foreign-tools-and-dll-built-with-gcc-gnat}@anchor{21b}@anchor{gnat_ugn/platform_specific_information id38}@anchor{21c} @subsubsection Program Built with Foreign Tools and DLL Built with GCC/GNAT @@ -26133,7 +25941,7 @@ example some C code built with Microsoft Visual C) and that there is a DLL named @code{test.dll} containing an Ada entry point named @code{ada_dll}. -The DLL (see @ref{1f2,,Introduction to Dynamic Link Libraries (DLLs)}) must have +The DLL (see @ref{1f0,,Introduction to Dynamic Link Libraries (DLLs)}) must have been built with debugging information (see the GNAT @code{-g} option). @subsubheading Debugging the DLL Directly @@ -26199,7 +26007,7 @@ Continue the program. This will run the program until it reaches the breakpoint that has been set. From that point you can use the standard way to debug a program -as described in (@ref{24,,Running and Debugging Ada Programs}). +as described in (@ref{163,,Running and Debugging Ada Programs}). @end itemize It is also possible to debug the DLL by attaching to a running process. @@ -26269,10 +26077,10 @@ Continue process execution. This last step will resume the process execution, and stop at the breakpoint we have set. From there you can use the standard approach to debug a program as described in -@ref{24,,Running and Debugging Ada Programs}. +@ref{163,,Running and Debugging Ada Programs}. @node Setting Stack Size from gnatlink,Setting Heap Size from gnatlink,Debugging a DLL,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{136}@anchor{gnat_ugn/platform_specific_information id39}@anchor{21f} +@anchor{gnat_ugn/platform_specific_information setting-stack-size-from-gnatlink}@anchor{127}@anchor{gnat_ugn/platform_specific_information id39}@anchor{21d} @subsubsection Setting Stack Size from @code{gnatlink} @@ -26315,7 +26123,7 @@ because the comma is a separator for this option. @end itemize @node Setting Heap Size from gnatlink,,Setting Stack Size from gnatlink,Mixed-Language Programming on Windows -@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{137}@anchor{gnat_ugn/platform_specific_information id40}@anchor{220} +@anchor{gnat_ugn/platform_specific_information setting-heap-size-from-gnatlink}@anchor{128}@anchor{gnat_ugn/platform_specific_information id40}@anchor{21e} @subsubsection Setting Heap Size from @code{gnatlink} @@ -26348,7 +26156,7 @@ because the comma is a separator for this option. @end itemize @node Windows Specific Add-Ons,,Mixed-Language Programming on Windows,Microsoft Windows Topics -@anchor{gnat_ugn/platform_specific_information windows-specific-add-ons}@anchor{221}@anchor{gnat_ugn/platform_specific_information win32-specific-addons}@anchor{222} +@anchor{gnat_ugn/platform_specific_information windows-specific-add-ons}@anchor{21f}@anchor{gnat_ugn/platform_specific_information win32-specific-addons}@anchor{220} @subsection Windows Specific Add-Ons @@ -26361,7 +26169,7 @@ This section describes the Windows specific add-ons. @end menu @node Win32Ada,wPOSIX,,Windows Specific Add-Ons -@anchor{gnat_ugn/platform_specific_information win32ada}@anchor{223}@anchor{gnat_ugn/platform_specific_information id41}@anchor{224} +@anchor{gnat_ugn/platform_specific_information win32ada}@anchor{221}@anchor{gnat_ugn/platform_specific_information id41}@anchor{222} @subsubsection Win32Ada @@ -26392,7 +26200,7 @@ gprbuild p.gpr @end quotation @node wPOSIX,,Win32Ada,Windows Specific Add-Ons -@anchor{gnat_ugn/platform_specific_information id42}@anchor{225}@anchor{gnat_ugn/platform_specific_information wposix}@anchor{226} +@anchor{gnat_ugn/platform_specific_information id42}@anchor{223}@anchor{gnat_ugn/platform_specific_information wposix}@anchor{224} @subsubsection wPOSIX @@ -26425,7 +26233,7 @@ gprbuild p.gpr @end quotation @node Mac OS Topics,,Microsoft Windows Topics,Platform-Specific Information -@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{2d}@anchor{gnat_ugn/platform_specific_information id43}@anchor{227} +@anchor{gnat_ugn/platform_specific_information mac-os-topics}@anchor{225}@anchor{gnat_ugn/platform_specific_information id43}@anchor{226} @section Mac OS Topics @@ -26440,7 +26248,7 @@ platform. @end menu @node Codesigning the Debugger,,,Mac OS Topics -@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{228} +@anchor{gnat_ugn/platform_specific_information codesigning-the-debugger}@anchor{227} @subsection Codesigning the Debugger @@ -26521,7 +26329,7 @@ the location where you installed GNAT. Also, be sure that users are in the Unix group @code{_developer}. @node Example of Binder Output File,Elaboration Order Handling in GNAT,Platform-Specific Information,Top -@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{e}@anchor{gnat_ugn/example_of_binder_output doc}@anchor{229}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{22a} +@anchor{gnat_ugn/example_of_binder_output example-of-binder-output-file}@anchor{e}@anchor{gnat_ugn/example_of_binder_output doc}@anchor{228}@anchor{gnat_ugn/example_of_binder_output id1}@anchor{229} @chapter Example of Binder Output File @@ -27273,7 +27081,7 @@ elaboration code in your own application). @c -- Example: A |withing| unit has a |with| clause, it |withs| a |withed| unit @node Elaboration Order Handling in GNAT,Inline Assembler,Example of Binder Output File,Top -@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{22b}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{22c} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order-handling-in-gnat}@anchor{f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat doc}@anchor{22a}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id1}@anchor{22b} @chapter Elaboration Order Handling in GNAT @@ -27303,7 +27111,7 @@ GNAT, either automatically or with explicit programming features. @end menu @node Elaboration Code,Elaboration Order,,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{22d}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{22e} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-code}@anchor{22c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id2}@anchor{22d} @section Elaboration Code @@ -27451,7 +27259,7 @@ elaborated. @end itemize @node Elaboration Order,Checking the Elaboration Order,Elaboration Code,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order}@anchor{22f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{230} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-order}@anchor{22e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id3}@anchor{22f} @section Elaboration Order @@ -27620,7 +27428,7 @@ however a compiler may not always find such an order due to complications with respect to control and data flow. @node Checking the Elaboration Order,Controlling the Elaboration Order in Ada,Elaboration Order,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{231}@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{232} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id4}@anchor{230}@anchor{gnat_ugn/elaboration_order_handling_in_gnat checking-the-elaboration-order}@anchor{231} @section Checking the Elaboration Order @@ -27681,7 +27489,7 @@ order. @end itemize @node Controlling the Elaboration Order in Ada,Controlling the Elaboration Order in GNAT,Checking the Elaboration Order,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-ada}@anchor{233}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{234} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-ada}@anchor{232}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id5}@anchor{233} @section Controlling the Elaboration Order in Ada @@ -28009,7 +27817,7 @@ is that the program continues to stay in the last state (one or more correct orders exist) even if maintenance changes the bodies of targets. @node Controlling the Elaboration Order in GNAT,Mixing Elaboration Models,Controlling the Elaboration Order in Ada,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{235}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-gnat}@anchor{236} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id6}@anchor{234}@anchor{gnat_ugn/elaboration_order_handling_in_gnat controlling-the-elaboration-order-in-gnat}@anchor{235} @section Controlling the Elaboration Order in GNAT @@ -28139,7 +27947,7 @@ The dynamic, legacy, and static models can be relaxed using compiler switch may not diagnose certain elaboration issues or install run-time checks. @node Mixing Elaboration Models,ABE Diagnostics,Controlling the Elaboration Order in GNAT,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{237}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{238} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat mixing-elaboration-models}@anchor{236}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id7}@anchor{237} @section Mixing Elaboration Models @@ -28186,7 +27994,7 @@ warning: "y.ads" which has static elaboration checks The warnings can be suppressed by binder switch @code{-ws}. @node ABE Diagnostics,SPARK Diagnostics,Mixing Elaboration Models,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat abe-diagnostics}@anchor{239}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{23a} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat abe-diagnostics}@anchor{238}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id8}@anchor{239} @section ABE Diagnostics @@ -28293,7 +28101,7 @@ declaration @code{Safe} because the body of function @code{ABE} has already been elaborated at that point. @node SPARK Diagnostics,Elaboration Circularities,ABE Diagnostics,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat spark-diagnostics}@anchor{23b}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{23c} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat spark-diagnostics}@anchor{23a}@anchor{gnat_ugn/elaboration_order_handling_in_gnat id9}@anchor{23b} @section SPARK Diagnostics @@ -28319,7 +28127,7 @@ rules. @end quotation @node Elaboration Circularities,Resolving Elaboration Circularities,SPARK Diagnostics,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{23d}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-circularities}@anchor{23e} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id10}@anchor{23c}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-circularities}@anchor{23d} @section Elaboration Circularities @@ -28419,7 +28227,7 @@ This section enumerates various tactics for eliminating the circularity. @end itemize @node Resolving Elaboration Circularities,Elaboration-related Compiler Switches,Elaboration Circularities,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{23f}@anchor{gnat_ugn/elaboration_order_handling_in_gnat resolving-elaboration-circularities}@anchor{240} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id11}@anchor{23e}@anchor{gnat_ugn/elaboration_order_handling_in_gnat resolving-elaboration-circularities}@anchor{23f} @section Resolving Elaboration Circularities @@ -28690,7 +28498,7 @@ Use the relaxed dynamic-elaboration model, with compiler switches @end itemize @node Elaboration-related Compiler Switches,Summary of Procedures for Elaboration Control,Resolving Elaboration Circularities,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{241}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-related-compiler-switches}@anchor{242} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id12}@anchor{240}@anchor{gnat_ugn/elaboration_order_handling_in_gnat elaboration-related-compiler-switches}@anchor{241} @section Elaboration-related Compiler Switches @@ -28871,7 +28679,7 @@ checks. The example above will still fail at run time with an ABE. @end table @node Summary of Procedures for Elaboration Control,Inspecting the Chosen Elaboration Order,Elaboration-related Compiler Switches,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{243}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{244} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id13}@anchor{242}@anchor{gnat_ugn/elaboration_order_handling_in_gnat summary-of-procedures-for-elaboration-control}@anchor{243} @section Summary of Procedures for Elaboration Control @@ -28929,7 +28737,7 @@ Use the relaxed dynamic elaboration model, with compiler switches @end itemize @node Inspecting the Chosen Elaboration Order,,Summary of Procedures for Elaboration Control,Elaboration Order Handling in GNAT -@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{245}@anchor{gnat_ugn/elaboration_order_handling_in_gnat inspecting-the-chosen-elaboration-order}@anchor{246} +@anchor{gnat_ugn/elaboration_order_handling_in_gnat id14}@anchor{244}@anchor{gnat_ugn/elaboration_order_handling_in_gnat inspecting-the-chosen-elaboration-order}@anchor{245} @section Inspecting the Chosen Elaboration Order @@ -29072,7 +28880,7 @@ gdbstr (body) @end quotation @node Inline Assembler,GNU Free Documentation License,Elaboration Order Handling in GNAT,Top -@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{10}@anchor{gnat_ugn/inline_assembler doc}@anchor{247}@anchor{gnat_ugn/inline_assembler id1}@anchor{248} +@anchor{gnat_ugn/inline_assembler inline-assembler}@anchor{10}@anchor{gnat_ugn/inline_assembler doc}@anchor{246}@anchor{gnat_ugn/inline_assembler id1}@anchor{247} @chapter Inline Assembler @@ -29131,7 +28939,7 @@ and with assembly language programming. @end menu @node Basic Assembler Syntax,A Simple Example of Inline Assembler,,Inline Assembler -@anchor{gnat_ugn/inline_assembler id2}@anchor{249}@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{24a} +@anchor{gnat_ugn/inline_assembler id2}@anchor{248}@anchor{gnat_ugn/inline_assembler basic-assembler-syntax}@anchor{249} @section Basic Assembler Syntax @@ -29247,7 +29055,7 @@ Intel: Destination first; for example @code{mov eax, 4}@w{ } @node A Simple Example of Inline Assembler,Output Variables in Inline Assembler,Basic Assembler Syntax,Inline Assembler -@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{24b}@anchor{gnat_ugn/inline_assembler id3}@anchor{24c} +@anchor{gnat_ugn/inline_assembler a-simple-example-of-inline-assembler}@anchor{24a}@anchor{gnat_ugn/inline_assembler id3}@anchor{24b} @section A Simple Example of Inline Assembler @@ -29396,7 +29204,7 @@ If there are no errors, @code{as} will generate an object file @code{nothing.out}. @node Output Variables in Inline Assembler,Input Variables in Inline Assembler,A Simple Example of Inline Assembler,Inline Assembler -@anchor{gnat_ugn/inline_assembler id4}@anchor{24d}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{24e} +@anchor{gnat_ugn/inline_assembler id4}@anchor{24c}@anchor{gnat_ugn/inline_assembler output-variables-in-inline-assembler}@anchor{24d} @section Output Variables in Inline Assembler @@ -29763,7 +29571,7 @@ end Get_Flags_3; @end quotation @node Input Variables in Inline Assembler,Inlining Inline Assembler Code,Output Variables in Inline Assembler,Inline Assembler -@anchor{gnat_ugn/inline_assembler id5}@anchor{24f}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{250} +@anchor{gnat_ugn/inline_assembler id5}@anchor{24e}@anchor{gnat_ugn/inline_assembler input-variables-in-inline-assembler}@anchor{24f} @section Input Variables in Inline Assembler @@ -29852,7 +29660,7 @@ _increment__incr.1: @end quotation @node Inlining Inline Assembler Code,Other Asm Functionality,Input Variables in Inline Assembler,Inline Assembler -@anchor{gnat_ugn/inline_assembler id6}@anchor{251}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{252} +@anchor{gnat_ugn/inline_assembler id6}@anchor{250}@anchor{gnat_ugn/inline_assembler inlining-inline-assembler-code}@anchor{251} @section Inlining Inline Assembler Code @@ -29923,7 +29731,7 @@ movl %esi,%eax thus saving the overhead of stack frame setup and an out-of-line call. @node Other Asm Functionality,,Inlining Inline Assembler Code,Inline Assembler -@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{253}@anchor{gnat_ugn/inline_assembler id7}@anchor{254} +@anchor{gnat_ugn/inline_assembler other-asm-functionality}@anchor{252}@anchor{gnat_ugn/inline_assembler id7}@anchor{253} @section Other @code{Asm} Functionality @@ -29938,7 +29746,7 @@ and @code{Volatile}, which inhibits unwanted optimizations. @end menu @node The Clobber Parameter,The Volatile Parameter,,Other Asm Functionality -@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{255}@anchor{gnat_ugn/inline_assembler id8}@anchor{256} +@anchor{gnat_ugn/inline_assembler the-clobber-parameter}@anchor{254}@anchor{gnat_ugn/inline_assembler id8}@anchor{255} @subsection The @code{Clobber} Parameter @@ -30002,7 +29810,7 @@ Use 'register' name @code{memory} if you changed a memory location @end itemize @node The Volatile Parameter,,The Clobber Parameter,Other Asm Functionality -@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{257}@anchor{gnat_ugn/inline_assembler id9}@anchor{258} +@anchor{gnat_ugn/inline_assembler the-volatile-parameter}@anchor{256}@anchor{gnat_ugn/inline_assembler id9}@anchor{257} @subsection The @code{Volatile} Parameter @@ -30038,7 +29846,7 @@ to @code{True} only if the compiler's optimizations have created problems. @node GNU Free Documentation License,Index,Inline Assembler,Top -@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{259}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{25a} +@anchor{share/gnu_free_documentation_license gnu-fdl}@anchor{1}@anchor{share/gnu_free_documentation_license doc}@anchor{258}@anchor{share/gnu_free_documentation_license gnu-free-documentation-license}@anchor{259} @chapter GNU Free Documentation License @@ -30526,8 +30334,8 @@ to permit their use in free software. @printindex ge -@anchor{de}@w{ } @anchor{gnat_ugn/gnat_utility_programs switches-related-to-project-files}@w{ } +@anchor{cf}@w{ } @c %**end of body @bye