From aaa3a6753574594b73746ddaf6e3b4e042a6a586 Mon Sep 17 00:00:00 2001 From: Gary Dismukes Date: Thu, 7 May 2020 14:58:33 -0400 Subject: [PATCH] [Ada] Various typo fixes and reformatting of comments gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst, errout.ads, erroutc.adb, exp_ch4.adb, exp_ch6.adb, freeze.adb: Comment rewording/reformatting/typo fixes. Replace "ie." with "that is" in comment; "can not" -> "cannot", and remove an extraneous underscore in another comment. * gnat_rm.texi, gnat_ugn.texi: Regenerate. --- .../implementation_defined_pragmas.rst | 6 +++--- gcc/ada/errout.ads | 4 ++-- gcc/ada/erroutc.adb | 12 +++++------ gcc/ada/exp_ch4.adb | 10 +++++----- gcc/ada/exp_ch6.adb | 8 ++++---- gcc/ada/freeze.adb | 14 ++++++------- gcc/ada/gnat_rm.texi | 8 ++++---- gcc/ada/gnat_ugn.texi | 20 ++++++++++--------- 8 files changed, 42 insertions(+), 40 deletions(-) diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst index d100b2259d8..2f60db506bf 100644 --- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst +++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst @@ -982,9 +982,9 @@ with a first parameter of True is to warn a client about use of a package, for example that it is not fully implemented. In previous versions of the compiler, combining *-gnatwe* with -Compile_Time_Warning resulted in an fatal error. Now the compiler will always -emit a warning. You can use :ref:`Compile_Time_Error` to force the generation -of an error. +Compile_Time_Warning resulted in a fatal error. Now the compiler always emits +a warning. You can use :ref:`Compile_Time_Error` to force the generation of +an error. Pragma Compiler_Unit ==================== diff --git a/gcc/ada/errout.ads b/gcc/ada/errout.ads index 68fcdb94d4f..1591a3712f5 100644 --- a/gcc/ada/errout.ads +++ b/gcc/ada/errout.ads @@ -705,8 +705,8 @@ package Errout is Flag_Location : Source_Ptr; Is_Compile_Time_Pragma : Boolean); -- Same as Error_Msg (String, Source_Ptr) except Is_Compile_Time_Pragma - -- lets the caller specify whether the is a - -- Compile_Time_Warning/Compile_Time_Error pragma. + -- lets the caller specify whether this is a Compile_Time_Warning or + -- Compile_Time_Error pragma. procedure Error_Msg_S (Msg : String); -- Output a message at current scan pointer location. This routine can be diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 14e2aad8b30..435cb143abe 100644 --- a/gcc/ada/erroutc.adb +++ b/gcc/ada/erroutc.adb @@ -258,12 +258,12 @@ package body Erroutc is elsif Warnings_Treated_As_Errors /= 0 then return True; - -- We should never treat warnings that originate from a - -- Compile_Time_Warning pragma as an error. Warnings_Count is the sum - -- of both "normal" and Compile_Time_Warning warnings. This means - -- that there only is one or more non-Compile_Time_Warning warnings - -- if Warnings_Count is greater than - -- Count_Compile_Time_Pragma_Warnings. + -- We should never treat warnings that originate from a + -- Compile_Time_Warning pragma as an error. Warnings_Count is the sum + -- of both "normal" and Compile_Time_Warning warnings. This means that + -- there are only one or more non-Compile_Time_Warning warnings when + -- Warnings_Count is greater than Count_Compile_Time_Pragma_Warnings. + elsif Warning_Mode = Treat_As_Error and then Warnings_Count > Count_Compile_Time_Pragma_Warnings then diff --git a/gcc/ada/exp_ch4.adb b/gcc/ada/exp_ch4.adb index 88dcb52349d..05c635f9412 100644 --- a/gcc/ada/exp_ch4.adb +++ b/gcc/ada/exp_ch4.adb @@ -226,8 +226,8 @@ package body Exp_Ch4 is procedure Narrow_Large_Operation (N : Node_Id); -- Try to compute the result of a large operation in a narrower type than - -- its nominal type. This is mainly aimed to get rid of operations done in - -- Universal_Integer that can be generated for attributes. + -- its nominal type. This is mainly aimed at getting rid of operations done + -- in Universal_Integer that can be generated for attributes. procedure Optimize_Length_Comparison (N : Node_Id); -- Given an expression, if it is of the form X'Length op N (or the other @@ -14040,12 +14040,12 @@ package body Exp_Ch4 is -- Now compute the size of the narrower type if Compar then - -- The type must be able to accomodate the operands + -- The type must be able to accommodate the operands Nsiz := Nat'Max (Lsiz, Rsiz); else - -- The type must be able to accomodate the operand(s) and the result. + -- The type must be able to accommodate the operand(s) and result. -- Note that Determine_Range typically does not report the bounds of -- the value as being larger than those of the base type, which means @@ -14090,7 +14090,7 @@ package body Exp_Ch4 is return; end if; - -- Finally rewrite the operation in the narrower type + -- Finally, rewrite the operation in the narrower type Nop := New_Op_Node (Kind, Sloc (N)); diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index 92be80287a6..d29040b3022 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -9982,8 +9982,8 @@ package body Exp_Ch6 is -- to ensure that if Func_Id is frozen then the computed result matches -- with the availability of the task master extra formal; unfortunately -- this is not feasible because we may be precisely freezing this entity - -- (ie. Is_Frozen has been set by Freeze_Entity but it has not completed - -- its work). + -- (that is, Is_Frozen has been set by Freeze_Entity but it has not + -- completed its work). if Has_Task (Func_Typ) then return True; @@ -9992,9 +9992,9 @@ package body Exp_Ch6 is return Might_Have_Tasks (Func_Typ); -- Handle subprogram type internally generated for dispatching call. We - -- can not rely on the return type of the subprogram type of dispatching + -- cannot rely on the return type of the subprogram type of dispatching -- calls since it is always a class-wide type (cf. Expand_Dispatching_ - -- _Call). + -- Call). elsif Ekind (Func_Id) = E_Subprogram_Type then if Is_Dispatch_Table_Entity (Func_Id) then diff --git a/gcc/ada/freeze.adb b/gcc/ada/freeze.adb index 57b48941c37..7df283a32c4 100644 --- a/gcc/ada/freeze.adb +++ b/gcc/ada/freeze.adb @@ -8726,8 +8726,8 @@ package body Freeze is return True; end if; - -- Check attribute Extra_Formal: if available it must be set only - -- in the last formal of E + -- Check attribute Extra_Formal: If available, it must be set only + -- on the last formal of E. Formal := First_Formal (E); while Present (Formal) loop @@ -8752,15 +8752,15 @@ package body Freeze is return False; end if; - -- Check attribute Extra_Formals: if E has extra formals then this - -- attribute must must point to the first extra formal of E. + -- Check attribute Extra_Formals: If E has extra formals, then this + -- attribute must point to the first extra formal of E. if Has_Extra_Formals then return Present (Extra_Formals (E)) and then Present (Extra_Formal (Last_Formal)) and then Extra_Formal (Last_Formal) = Extra_Formals (E); - -- When E has no formals the first extra formal is available through + -- When E has no formals, the first extra formal is available through -- the Extra_Formals attribute. elsif Present (Extra_Formals (E)) then @@ -8908,9 +8908,9 @@ package body Freeze is if not Has_Foreign_Convention (E) then if No (Extra_Formals (E)) then - -- Extra formals are shared by derived subprograms; therefore if + -- Extra formals are shared by derived subprograms; therefore, if -- the ultimate alias of E has been frozen before E then the extra - -- formals have been added but the attribute Extra_Formals is + -- formals have been added, but the attribute Extra_Formals is -- still unset (and must be set now). if Present (Alias (E)) diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index d72f905a2df..0f6109e6a96 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT Reference Manual , May 14, 2020 +GNAT Reference Manual , Jul 01, 2020 AdaCore @@ -2361,9 +2361,9 @@ with a first parameter of True is to warn a client about use of a package, for example that it is not fully implemented. In previous versions of the compiler, combining @emph{-gnatwe} with -Compile_Time_Warning resulted in an fatal error. Now the compiler will always -emit a warning. You can use @ref{3a,,Pragma Compile_Time_Error} to force the generation -of an error. +Compile_Time_Warning resulted in a fatal error. Now the compiler always emits +a warning. You can use @ref{3a,,Pragma Compile_Time_Error} to force the generation of +an error. @node Pragma Compiler_Unit,Pragma Compiler_Unit_Warning,Pragma Compile_Time_Warning,Implementation Defined Pragmas @anchor{gnat_rm/implementation_defined_pragmas pragma-compiler-unit}@anchor{3c} diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index 669199aefce..b6ed321466c 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -21,7 +21,7 @@ @copying @quotation -GNAT User's Guide for Native Platforms , May 05, 2020 +GNAT User's Guide for Native Platforms , Jul 01, 2020 AdaCore @@ -4144,10 +4144,9 @@ to be a consideration. @geindex Run-Time Library @geindex rebuilding -It may be useful to recompile the GNAT library in various contexts, the -most important one being the use of partition-wide configuration pragmas -such as @code{Normalize_Scalars}. A special Makefile called -@code{Makefile.adalib} is provided to that effect and can be found in +It may be useful to recompile the GNAT library in various debugging or +experimentation contexts. A project file called +@code{libada.gpr} is provided to that effect and can be found in the directory containing the GNAT library. The location of this directory depends on the way the GNAT environment has been installed and can be determined by means of the command: @@ -4156,10 +4155,13 @@ be determined by means of the command: $ gnatls -v @end example -The last entry in the object search path usually contains the -gnat library. This Makefile contains its own documentation and in -particular the set of instructions needed to rebuild a new library and -to use it. +The last entry in the source search path usually contains the +gnat library (the @code{adainclude} directory). This project file contains its +own documentation and in particular the set of instructions needed to rebuild a +new library and to use it. + +Note that rebuilding the GNAT Run-Time is only recommended for temporary +experiments or debugging, and is not supported. @geindex Conditional compilation -- 2.30.2