+2018-01-11 Hristian Kirtchev <kirtchev@adacore.com>
+
+ * exp_aggr.adb, exp_ch9.adb, exp_util.adb, sem_aggr.adb, sem_ch3.adb,
+ sem_res.adb, sem_util.adb: Minor reformatting.
+
2018-01-11 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Predicate): Indicate that the type
-- proper context, in which the loop parameter is visible.
if Present (Comp_Typ) and then not Is_Array_Type (Comp_Typ) then
- if
- Nkind (Parent (Expr_Q)) = N_Iterated_Component_Association
- or else
- Nkind (Parent (Parent ((Expr_Q))))
- = N_Iterated_Component_Association
+ if Nkind (Parent (Expr_Q)) = N_Iterated_Component_Association
+ or else Nkind (Parent (Parent ((Expr_Q)))) =
+ N_Iterated_Component_Association
then
null;
else
-- Scalar types are OK if their size is a multiple of Storage_Unit
elsif Is_Scalar_Type (Ctyp) then
-
if Csiz mod System_Storage_Unit /= 0 then
return False;
end if;
return False;
- elsif
- Nkind (Parent (Expr)) = N_Iterated_Component_Association
+ elsif Nkind (Parent (Expr)) =
+ N_Iterated_Component_Association
then
-
-- Ditto for iterated component associations, which in
-- general require an enclosing loop and involve nonstatic
-- expressions.
if Create_Secondary_Stack_For_Task (TaskId) then
declare
- Stack_Size : Node_Id;
-
Size_Expr : constant Node_Id :=
Expression (First (
Pragma_Argument_Associations (
Get_Rep_Pragma (TaskId,
Name_Secondary_Stack_Size))));
+ Stack_Size : Node_Id;
+
begin
-- The secondary stack is defined inside the corresponding
-- record. Therefore if the size of the stack is set by means
if Present (New_E) then
Rewrite (N, New_Occurrence_Of (New_E, Sloc (N)));
- -- Implement rule in AI12-0166: a precondition for a
- -- protected operation cannot include an internal call to
- -- a protected function of the type. In the case of an
- -- inherited condition for an overriding operation, both the
- -- operation and the function are given by primitive wrappers.
+ -- AI12-0166: a precondition for a protected operation
+ -- cannot include an internal call to a protected function
+ -- of the type. In the case of an inherited condition for an
+ -- overriding operation, both the operation and the function
+ -- are given by primitive wrappers.
if Ekind (New_E) = E_Function
and then Is_Primitive_Wrapper (New_E)
Error_Msg_NE
("internal call to& cannot appear in inherited "
& "precondition of protected operation&",
- N, Wrapped_Entity (New_E));
+ N, Wrapped_Entity (New_E));
end if;
-- If the entity is an overridden primitive and we are not
Set_Etype (Ent, Standard_Void_Type);
Set_Parent (Ent, Parent (N));
Push_Scope (Ent);
- Id := Make_Defining_Identifier (Loc,
- Chars => Chars (Defining_Identifier (N)));
+ Id :=
+ Make_Defining_Identifier (Loc,
+ Chars => Chars (Defining_Identifier (N)));
-- Insert and decorate the index variable in the current scope.
-- The expression has to be analyzed once the index variable is
then
null;
- -- The operation is inherited and must be overridden.
+ -- The operation is inherited and must be overridden
elsif not Comes_From_Source (Prim) then
Error_Msg_NE
Error_Msg_N
("\even if user-defined equality exists (RM 4.5.2 (28.1/3)?", N);
end if;
-
end Resolve_Set_Membership;
-- Start of processing for Resolve_Membership_Op
-- conjunct in a postcondition) with a potentially unevaluated operand.
Par := Parent (Expr);
-
- while not Nkind_In (Par, N_If_Expression,
+ while not Nkind_In (Par, N_And_Then,
N_Case_Expression,
- N_And_Then,
- N_Or_Else,
+ N_If_Expression,
N_In,
N_Not_In,
+ N_Or_Else,
N_Quantified_Expression)
loop
Expr := Par;