+2016-10-13 Gary Dismukes <dismukes@adacore.com>
+
+ * exp_ch7.adb, einfo.ads, sem_prag.adb, sem_prag.ads, sem.ads,
+ sem_attr.adb, sem_case.adb, sem_ch13.ads: Minor typo fixes and
+ reformatting.
+
2016-10-13 Javier Miranda <miranda@adacore.com>
* sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New
-- Anonymous_Designated_Type (Node35)
-- Defined in variables which represent anonymous finalization masters.
--- Contains the designated type which is being services by the master.
+-- Contains the designated type which is being serviced by the master.
-- Anonymous_Masters (Elist29)
-- Defined in packages, subprograms, and subprogram bodies. Contains a
-- Partial_Refinement_Constituents (synthesized)
-- Defined in abstract state entities. Returns the constituents that
-- refine the state in the current scope, which are allowed in a global
--- refinement in this scope. These consist in those constituents that are
+-- refinement in this scope. These consist of those constituents that are
-- abstract states with no or only partial refinement visible, and those
-- that are not themselves abstract states.
-- Include the anonymous master in the list of existing masters which
-- appear in this unit. This effectively creates a mapping between a
- -- master and a designated type which in turn allows for the reusal
- -- of masters on a per-unit basis.
+ -- master and a designated type which in turn allows for the reuse of
+ -- masters on a per-unit basis.
All_FMs := Anonymous_Masters (Unit_Id);
In_Compile_Time_Warning_Or_Error : Boolean := False;
-- Switch to indicate that we are validating a pragma Compile_Time_Warning
- -- or Compile_Time_Error after the backend has been called (to check these
- -- pragmas for size and alignment apropriateness).
+ -- or Compile_Time_Error after the back end has been called (to check these
+ -- pragmas for size and alignment appropriateness).
In_Default_Expr : Boolean := False;
-- Switch to indicate that we are analyzing a default component expression.
when Attribute_Asm_Input =>
Check_Asm_Attribute;
- -- The back-end may need to take the address of E2
+ -- The back end may need to take the address of E2
if Is_Entity_Name (E2) then
Set_Address_Taken (Entity (E2));
Note_Possible_Modification (E2, Sure => True);
- -- The back-end may need to take the address of E2
+ -- The back end may need to take the address of E2
if Is_Entity_Name (E2) then
Set_Address_Taken (Entity (E2));
-- out-of-order issues.
-- This expansion is both harmful and not needed in SPARK mode,
- -- since the formal verification backend relies on the types of
+ -- since the formal verification back end relies on the types of
-- nodes (hence is not robust w.r.t. a change to base type here),
-- and does not suffer from the out-of-order issue described
-- above. Thus, this expansion is skipped in SPARK mode.
Set_Etype (N, Universal_Integer);
-- If we are processing pragmas Compile_Time_Warning and Compile_
- -- Time_Errors after the backend has been called and this occurrence
+ -- Time_Errors after the back end has been called and this occurrence
-- of 'Size is known at compile time then it is safe to perform this
-- evaluation. Needed to perform the static evaluation of the full
-- boolean expression of these pragmas.
Store_String_Char (Get_String_Char (Full_Name, Pos (J)));
end loop;
- -- For standard type return the name of the type. as there is no
+ -- For standard types return the name of the type, as there is no
-- explicit source declaration to use. Otherwise compute CRC and
- -- convert it to string one character at a time so as not to use
+ -- convert it to string one character at a time, so as not to use
-- Image within the compiler.
if Scope (Entity (P)) /= Standard_Standard then
-- found an illegal intersection.
procedure Check_Duplicates;
- -- Check for duplicate choices, and call Dup_Choice is there are any
+ -- Check for duplicate choices, and call Dup_Choice if there are any
-- such errors. Note that predicates are irrelevant here.
procedure Dup_Choice (Lo, Hi : Uint; C : Node_Id);
-- Then check for overlaps
-- If the subtype has a static predicate, the predicate defines subsets
- -- of legal values and requires finer grained analysis.
+ -- of legal values and requires finer-grained analysis.
-- Note that in GNAT the predicate is considered static if the predicate
-- expression is static, independently of whether the aspect mentions
-- N is a pragma Compile_Time_Error or Compile_Warning_Error whose boolean
-- expression is not known at compile time. This procedure makes an entry
-- in a table. The actual checking is performed by Validate_Compile_Time_
- -- Warning_Errors which is invoked after calling the backend.
+ -- Warning_Errors, which is invoked after calling the back end.
procedure Validate_Compile_Time_Warning_Errors;
- -- This routine is called after calling the backend to validate pragmas
+ -- This routine is called after calling the back end to validate pragmas
-- Compile_Time_Error and Compile_Time_Warning for size and alignment
-- appropriateness. The reason it is called that late is to take advantage
- -- of any back-annotation of size and alignment performed by the backend.
+ -- of any back-annotation of size and alignment performed by the back end.
procedure Validate_Unchecked_Conversion
(N : Node_Id;
-- back end as required.
procedure Validate_Unchecked_Conversions;
- -- This routine is called after calling the backend to validate unchecked
+ -- This routine is called after calling the back end to validate unchecked
-- conversions for size and alignment appropriateness. The reason it is
-- called that late is to take advantage of any back-annotation of size
- -- and alignment performed by the backend.
+ -- and alignment performed by the back end.
procedure Validate_Address_Clauses;
-- This is called after the back end has been called (and thus after the
Constit_Id : Entity_Id) return Entity_Id;
-- Given the entity of a constituent Constit_Id, find the corresponding
-- encapsulating state which appears in States. The routine returns Empty
- -- is no such state is found.
+ -- if no such state is found.
function Find_Related_Context
(Prag : Node_Id;
-- Not one of the constituents appeared as Input. Always emit an
-- error when the full refinement is visible (SPARK RM 7.2.4(3a)).
- -- When only partial refinement is visible, emit an
- -- error if the abstract state itself is not utilized
- -- (SPARK RM 7.2.4(3d)). In the case where both are utilized,
- -- an error will be issued in Check_State_And_Constituent_Use.
+ -- When only partial refinement is visible, emit an error if the
+ -- abstract state itself is not utilized (SPARK RM 7.2.4(3d)). In
+ -- the case where both are utilized, an error will be issued in
+ -- Check_State_And_Constituent_Use.
if not In_Seen
and then (Has_Visible_Refinement (State_Id)
procedure Check_Constituent_Usage (State_Id : Entity_Id);
-- Determine whether at least one constituent of state State_Id with
-- full or partial visible refinement is used and has mode Proof_In.
- -- Ensure that the remaining constituents do not have Input, In_Out
- -- or Output modes. Emit an error of this is not the case
+ -- Ensure that the remaining constituents do not have Input, In_Out,
+ -- or Output modes. Emit an error if this is not the case
-- (SPARK RM 7.2.4(5)).
-----------------------------
Eloc : Source_Ptr);
-- Common processing for Compile_Time_Error and Compile_Time_Warning of
-- pragma N. Called when the pragma is processed as part of its regular
- -- analysis but also called after calling the backend to validate these
- -- pragmas for size and alignment apropriateness.
+ -- analysis but also called after calling the back end to validate these
+ -- pragmas for size and alignment appropriateness.
procedure Process_Compilation_Unit_Pragmas (N : Node_Id);
-- Called at the start of processing compilation unit N to deal with any