From 265341dc527754b8b3d390e870b43f00142933f7 Mon Sep 17 00:00:00 2001 From: Piotr Trojanek Date: Sun, 9 Oct 2022 22:01:51 +0200 Subject: [PATCH] ada: Fix various typos in GNAT User's Guide Fix uncontroversial typos. gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Fix typos. * doc/gnat_ugn/elaboration_order_handling_in_gnat.rst: Fix typos and refill as necessary; remove trailing whitespace. * doc/gnat_ugn/gnat_and_program_execution.rst: Fix typos. * gnat_ugn.texi: Regenerate. --- .../gnat_ugn/building_executable_programs_with_gnat.rst | 2 +- .../doc/gnat_ugn/elaboration_order_handling_in_gnat.rst | 15 ++++++++------- gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst | 4 ++-- gcc/ada/gnat_ugn.texi | 13 +++++++------ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 49cfc74..83bc50f 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -7403,7 +7403,7 @@ development environments much more flexible. Examples of ``gnatbind`` Usage ------------------------------ -Here are some examples of ``gnatbind`` invovations: +Here are some examples of ``gnatbind`` invocations: :: diff --git a/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst b/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst index 4982ebf..76a1461 100644 --- a/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/elaboration_order_handling_in_gnat.rst @@ -265,7 +265,7 @@ respect to control and data flow. Checking the Elaboration Order ============================== -To avoid placing the entire elaboration-order burden on the programmer, Ada +To avoid placing the entire elaboration-order burden on the programmer, Ada provides three lines of defense: * *Static semantics* @@ -931,9 +931,9 @@ Resolving Elaboration Circularities =================================== The most desirable option from the point of view of long-term maintenance is to -rearrange the program so that the elaboration problems are avoided. One useful -technique is to place the elaboration code into separate child packages. -Another is to move some of the initialization code to explicitly invoked +rearrange the program so that the elaboration problems are avoided. One useful +technique is to place the elaboration code into separate child packages. +Another is to move some of the initialization code to explicitly invoked subprograms, where the program controls the order of initialization explicitly. Although this is the most desirable option, it may be impractical and involve too much modification, especially in the case of complex legacy code. @@ -990,8 +990,9 @@ following tactics to eliminate the circularity: change pragma Elaborate_All for unit "..." to Elaborate in unit "..." This tactic is always suggested with the pragma ``Elaborate_All`` elimination - tactic. It offers a different alernative of guaranteeing that the argument of - the pragma will still be elaborated prior to the unit containing the pragma. + tactic. It offers a different alternative of guaranteeing that the argument + of the pragma will still be elaborated prior to the unit containing the + pragma. The programmer should update the pragma as advised, and rebuild the program. @@ -1281,7 +1282,7 @@ Summary of Procedures for Elaboration Control A programmer should first compile the program with the default options, using none of the binder or compiler switches. If the binder succeeds in finding an -elaboration order, then apart from possible cases involing dispatching calls +elaboration order, then apart from possible cases involving dispatching calls and access-to-subprogram types, the program is free of elaboration errors. If it is important for the program to be portable to compilers other than GNAT, diff --git a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst index 0d78e43..e827d1f 100644 --- a/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst +++ b/gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst @@ -2321,7 +2321,7 @@ erroneous, and the compiler would be entitled to assume that However, in practice, this would cause some existing code that seems to work with no optimization to start failing at high -levels of optimzization. +levels of optimization. What the compiler does for such cases is to assume that marking a variable as aliased indicates that some "funny business" may @@ -2728,7 +2728,7 @@ To deal with the portability issue, and with the problem of mathematical versus run-time interpretation of the expressions in assertions, GNAT provides comprehensive control over the handling of intermediate overflow. GNAT can operate in three modes, and -furthemore, permits separate selection of operating modes for +furthermore, permits separate selection of operating modes for the expressions within assertions (here the term 'assertions' is used in the technical sense, which includes preconditions and so forth) and for expressions appearing outside assertions. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 513ab1e..0f23d5b 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -16717,7 +16717,7 @@ development environments much more flexible. @subsection Examples of @code{gnatbind} Usage -Here are some examples of @code{gnatbind} invovations: +Here are some examples of @code{gnatbind} invocations: @quotation @@ -20793,7 +20793,7 @@ erroneous, and the compiler would be entitled to assume that However, in practice, this would cause some existing code that seems to work with no optimization to start failing at high -levels of optimzization. +levels of optimization. What the compiler does for such cases is to assume that marking a variable as aliased indicates that some “funny business” may @@ -21244,7 +21244,7 @@ To deal with the portability issue, and with the problem of mathematical versus run-time interpretation of the expressions in assertions, GNAT provides comprehensive control over the handling of intermediate overflow. GNAT can operate in three modes, and -furthemore, permits separate selection of operating modes for +furthermore, permits separate selection of operating modes for the expressions within assertions (here the term ‘assertions’ is used in the technical sense, which includes preconditions and so forth) and for expressions appearing outside assertions. @@ -27324,8 +27324,9 @@ change pragma Elaborate_All for unit "..." to Elaborate in unit "..." @end example This tactic is always suggested with the pragma @code{Elaborate_All} elimination -tactic. It offers a different alernative of guaranteeing that the argument of -the pragma will still be elaborated prior to the unit containing the pragma. +tactic. It offers a different alternative of guaranteeing that the argument +of the pragma will still be elaborated prior to the unit containing the +pragma. The programmer should update the pragma as advised, and rebuild the program. @@ -27698,7 +27699,7 @@ checks. The example above will still fail at run time with an ABE. A programmer should first compile the program with the default options, using none of the binder or compiler switches. If the binder succeeds in finding an -elaboration order, then apart from possible cases involing dispatching calls +elaboration order, then apart from possible cases involving dispatching calls and access-to-subprogram types, the program is free of elaboration errors. If it is important for the program to be portable to compilers other than GNAT, -- 2.7.4