+2015-11-24 Gary Dismukes <dismukes@adacore.com>
+
+ * sem_ch3.adb, sem_type.adb, sem_ch7.adb, sem_ch9.adb, checks.adb,
+ sem_prag.adb, contracts.adb, g-strhas.ads, sem_ch6.adb: Minor
+ reformatting, rewording, and typo corrections.
+
2015-11-24 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <Concurrent types>: In
-- range of x op y is included in the range of type1
-- size of type1 is at least twice the result size of op
- -- then we don't do an overflow check in any case, instead we transform
+ -- then we don't do an overflow check in any case. Instead, we transform
-- the operation so that we end up with:
-- type1 (type1 (x) op type1 (y))
-- is replaced with a reference to Rnn.
-- If our parent is a conversion node then there is no point in
- -- generating a conversion to Result_Type, we will let the parent
+ -- generating a conversion to Result_Type. Instead, we let the parent
-- handle this. Note that this special case is not just about
-- optimization. Consider
-- Analyze_Previous_Constracts. Analyze the contracts of all constructs in
-- the list L. If Freeze_Nod is set, then the analysis stops when the node
-- is reached. Freeze_Id is the entity of some related context which caused
- -- freezing upto node Freeze_Nod.
+ -- freezing up to node Freeze_Nod.
procedure Expand_Subprogram_Contract (Body_Id : Entity_Id);
-- Expand the contracts of a subprogram body and its correspoding spec (if
Par := Parent (Par);
end loop;
- -- Analyze the contracts of all eligible construct upto the body which
+ -- Analyze the contracts of all eligible construct up to the body which
-- caused the "freezing".
if Is_List_Member (Body_Decl) then
-- string hash functions in Ada.Containers.
--
-- The algorithm used here is not appropriate for applications that require
--- cryptographically strong hashes, or for application which wish to use very
+-- cryptographically strong hashes, or for applications that wish to use very
-- wide hash values as pseudo unique identifiers. In such cases please refer
-- to GNAT.SHA1 and GNAT.MD5.
Check_Unused_Body_States (Defining_Entity (Context));
- -- State refinements are visible upto the end the of the package
- -- body declarations. Hide the state refinements from visibility
- -- to restore the original state conditions.
+ -- State refinements are visible up to the end of the package body
+ -- declarations. Hide the state refinements from visibility to
+ -- restore the original state conditions.
Remove_Visible_Refinements (Corresponding_Spec (Context));
end if;
begin
-- A [generic] subprogram body "freezes" the contract of the nearest
-- enclosing package body and all other contracts encountered in the
- -- same declarative part upto and excluding the subprogram body:
+ -- same declarative part up to and excluding the subprogram body:
-- package body Nearest_Enclosing_Package
-- with Refined_State => (State => Constit)
begin
-- A [generic] package body "freezes" the contract of the nearest
-- enclosing package body and all other contracts encountered in the
- -- same declarative part upto and excluding the package body:
+ -- same declarative part up to and excluding the package body:
-- package body Nearest_Enclosing_Package
-- with Refined_State => (State => Constit)
begin
-- An entry body "freezes" the contract of the nearest enclosing package
-- body and all other contracts encountered in the same declarative part
- -- upto and excluding the entry body. This ensures that any annotations
+ -- up to and excluding the entry body. This ensures that any annotations
-- referenced by the contract of an entry or subprogram body declared
-- within the current protected body are available.
begin
-- A protected body "freezes" the contract of the nearest enclosing
-- package body and all other contracts encountered in the same
- -- declarative part upto and excluding the protected body. This ensures
+ -- declarative part up to and excluding the protected body. This ensures
-- that any annotations referenced by the contract of an entry or
-- subprogram body declared within the current protected body are
-- available.
begin
-- A task body "freezes" the contract of the nearest enclosing package
-- body and all other contracts encountered in the same declarative part
- -- upto and excluding the task body. This ensures that annotations
+ -- up to and excluding the task body. This ensures that annotations
-- referenced by the contract of an entry or subprogram body declared
-- within the current protected body are available.
Others_Seen : Boolean := False;
-- This flag is set when an "others" choice is encountered. It is used
- -- to detect multiple illegal occurences of "others".
+ -- to detect multiple illegal occurrences of "others".
procedure Analyze_Contract_Case (CCase : Node_Id);
-- Verify the legality of a single contract case
Preanalyze_Assert_Expression (Case_Guard, Standard_Boolean);
-- Emit a clarification message when the case guard contains
- -- at leat one undefined reference, possibly due to contract
+ -- at least one undefined reference, possibly due to contract
-- "freezing".
if Errors /= Serious_Errors_Detected
Preanalyze_Assert_Expression (Conseq, Standard_Boolean);
-- Emit a clarification message when the consequence contains
- -- at leat one undefined reference, possibly due to contract
+ -- at least one undefined reference, possibly due to contract
-- "freezing".
if Errors /= Serious_Errors_Detected
Errors := Serious_Errors_Detected;
Preanalyze_Assert_Expression (Expr, Standard_Boolean);
- -- Emit a clarification message when the expression contains at leat one
- -- undefined reference, possibly due to contract "freezing".
+ -- Emit a clarification message when the expression contains at least
+ -- one undefined reference, possibly due to contract "freezing".
if Errors /= Serious_Errors_Detected
and then Present (Freeze_Id)
begin
Global_Seen := False;
- -- Process all formal parameters of entries, [generic] subprograms and
+ -- Process all formal parameters of entries, [generic] subprograms, and
-- their bodies.
if Ekind_In (Subp_Id, E_Entry,
Append_New_Elmt (Formal, Subp_Outputs);
-- Out parameters can act as inputs when the related type is
- -- tagged, unconstrained array, unconstrained record or record
+ -- tagged, unconstrained array, unconstrained record, or record
-- with unconstrained components.
if Ekind (Formal) = E_Out_Parameter
-- entities. We do not introduce explicit versions of primitive operators
-- for each type definition. As a result, there is only one entity
-- corresponding to predefined addition on all numeric types, etc. The
- -- back-end resolves predefined operators according to their type. The
+ -- back end resolves predefined operators according to their type. The
-- visibility of primitive operations then reduces to the visibility of the
-- resulting type: (a + b) is a legal interpretation of some primitive
-- operator + if the type of the result (which must also be the type of a
elsif From_Limited_With (T1) then
- -- If the expected type is the non-limited view of a type, the
+ -- If the expected type is the nonlimited view of a type, the
-- expression may have the limited view. If that one in turn is
-- incomplete, get full view if available.
if Ekind (Target_Typ) = E_Incomplete_Type then
- -- We must have either a full view or a non-limited view of the type
+ -- We must have either a full view or a nonlimited view of the type
-- to locate the list of ancestors.
if Present (Full_View (Target_Typ)) then
Target_Typ := Non_Limited_View (Target_Typ);
end if;
- -- Protect the frontend against previously detected errors
+ -- Protect the front end against previously detected errors
if Ekind (Target_Typ) = E_Incomplete_Type then
return False;