+2011-08-31 Matthew Heaney <heaney@adacore.com>
+
+ * a-rbtgbo.adb (Clear_Tree): Assert representation invariant for lock
+ status.
+
+2011-08-31 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch5.adb: Set kind of loop parameter properly, to preserve all
+ errors in B tests.
+
+2011-08-31 Jose Ruiz <ruiz@adacore.com>
+
+ * sem_ch13.adb (Analyze_Aspect_Specifications): For the Priority and
+ Interrupt_Priority aspects, force the analysis of the aspect expression
+ (when building the equivalent pragma). Otherwise, its analysis is done
+ too late, after the task or protected object has been created.
+ * sem_ch9.adb (Analyze_Single_Protected_Declaration,
+ Analyze_Single_Task_Declaration): Remove the code to move the aspects
+ to the object declaration because they are needed in the type
+ declaration.
+
2011-08-31 Robert Dewar <dewar@adacore.com>
* exp_ch5.adb, exp_ch7.ads, sem_ch5.adb, put_scos.adb, s-rannum.adb,
"attempt to tamper with cursors (container is busy)";
end if;
+ -- The lock status (which monitors "element tampering") always implies
+ -- that the busy status (which monitors "cursor tampering") is set too;
+ -- this is a representation invariant. Thus if the busy bit is not set,
+ -- then the lock bit must not be set either.
+ pragma Assert (Tree.Lock = 0);
+
Tree.First := 0;
Tree.Last := 0;
Tree.Root := 0;
Tree.Length := 0;
-
- -- Why are the following commented out with no explanation ???
- -- Tree.Busy
- -- Tree.Lock
-
Tree.Free := -1;
end Clear_Tree;
Pragma_Identifier =>
Make_Identifier (Sloc (Id), Pname),
Pragma_Argument_Associations =>
- New_List (Relocate_Node (Expr)));
+ New_List
+ (Make_Pragma_Argument_Association
+ (Sloc (Id), Expression => Relocate_Node (Expr))));
Set_From_Aspect_Specification (Aitem, True);
end if;
Prepend (Aitem, To => L);
+
+ -- Analyze rewritten pragma. Otherwise, its
+ -- analysis is done too late, after the task or
+ -- protected object has been created.
+
+ Analyze (Aitem);
end;
-- For all other cases, insert in sequence
begin
Enter_Name (Id);
- Set_Ekind (Id, E_Constant);
-- We always consider the loop variable to be referenced, since
-- the loop may be used just for counting purposes.
Analyze (DS);
end if;
+ -- Set kind of loop parameter, which may be used in
+ -- the subsequent analysis of of the condition in a
+ -- quantified expression.
+
+ Set_Ekind (Id, E_Loop_Parameter);
return;
end;
-- --
------------------------------------------------------------------------------
-with Aspects; use Aspects;
with Atree; use Atree;
with Checks; use Checks;
with Einfo; use Einfo;
Defining_Identifier => O_Name,
Object_Definition => Make_Identifier (Loc, Chars (T)));
- Move_Aspects (N, O_Decl);
Rewrite (N, T_Decl);
Insert_After (N, O_Decl);
Mark_Rewrite_Insertion (O_Decl);
Defining_Identifier => O_Name,
Object_Definition => Make_Identifier (Loc, Chars (T)));
- Move_Aspects (N, O_Decl);
Rewrite (N, T_Decl);
Insert_After (N, O_Decl);
Mark_Rewrite_Insertion (O_Decl);