or else Has_Interfaces (Protect_Rec)
or else
((Has_Attach_Handler (Ptyp) or else Has_Interrupt_Handler (Ptyp))
- and then not Restriction_Active (No_Dynamic_Attachment))
+ and then not Restriction_Active (No_Dynamic_Attachment))
then
declare
- Pkg_Id : constant RTU_Id :=
- Corresponding_Runtime_Package (Ptyp);
+ Pkg_Id : constant RTU_Id := Corresponding_Runtime_Package (Ptyp);
+
Called_Subp : RE_Id;
begin
Append_To (Args,
Make_Attribute_Reference (Loc,
- Prefix =>
- New_Reference_To (P_Arr, Loc),
+ Prefix => New_Reference_To (P_Arr, Loc),
Attribute_Name => Name_Unrestricted_Access));
-- Build_Entry_Names generation flag. When set to true, the
or else Present (Interface_List (Parent (Typ)))
or else
(((Has_Attach_Handler (Typ) and then not Restricted_Profile)
- or else Has_Interrupt_Handler (Typ))
+ or else Has_Interrupt_Handler (Typ))
and then not Restriction_Active (No_Dynamic_Attachment))
then
if Abort_Allowed
or else Restriction_Active (No_Entry_Queue) = False
or else Number_Entries (Typ) > 1
or else (Has_Attach_Handler (Typ)
- and then not Restricted_Profile)
+ and then not Restricted_Profile)
then
Pkg_Id := System_Tasking_Protected_Objects_Entries;
else
if Act_ST = Etype (Exp) then
return;
-
else
- Rewrite (Exp,
- Convert_To (Act_ST, Relocate_Node (Exp)));
+ Rewrite (Exp, Convert_To (Act_ST, Relocate_Node (Exp)));
Analyze_And_Resolve (Exp, Act_ST);
end if;
end Convert_To_Actual_Subtype;
Name_Req : Boolean := False) return Node_Id
is
New_Exp : Node_Id;
-
begin
Remove_Side_Effects (Exp, Name_Req);
New_Exp := New_Copy_Tree (Exp);
-- Inherited : constant Subprogram_List :=
-- Inherited_Subprograms (Spec_Id);
- -- List of subprograms inherited by this subprogram
+-- -- List of subprograms inherited by this subprogram
+ -- Code is currently commented out as, in some cases, it causes crashes
+ -- because Direct_Primitive_Operations is not available for a private
+ -- type???
- Last_Postcondition : Node_Id := Empty;
+ Last_Postcondition : Node_Id := Empty;
-- Last postcondition on the subprogram, or else Empty if either no
-- postcondition or only inherited postconditions.
Attribute_Result_Mentioned : Boolean := False;
-- Whether attribute 'Result is mentioned in a postcondition
- Post_State_Mentioned : Boolean := False;
+ Post_State_Mentioned : Boolean := False;
-- Whether some expression mentioned in a postcondition can have a
-- different value in the post-state than in the pre-state.
function Check_Attr_Result (N : Node_Id) return Traverse_Result;
- -- Check whether N is a reference to the attribute 'Result, and if so
- -- set Attribute_Result_Mentioned and return Abandon. Otherwise return
- -- OK.
+ -- Check if N is a reference to the attribute 'Result, and if so set
+ -- Attribute_Result_Mentioned and return Abandon. Otherwise return OK.
function Check_Post_State (N : Node_Id) return Traverse_Result;
-- Check whether the value of evaluating N can be different in the
-- reference to attribute 'Old, in order to ignore its prefix, which
-- is precisely evaluated in the pre-state. Otherwise return OK.
- procedure Process_Post_Conditions
- (Spec : Node_Id;
- Class : Boolean);
+ procedure Process_Post_Conditions (Spec : Node_Id; Class : Boolean);
-- This processes the Spec_PPC_List from Spec, processing any
-- postconditions from the list. If Class is True, then only
-- postconditions marked with Class_Present are considered. The
function Check_Attr_Result (N : Node_Id) return Traverse_Result is
begin
if Nkind (N) = N_Attribute_Reference
- and then
- Get_Attribute_Id (Attribute_Name (N)) = Attribute_Result
+ and then Get_Attribute_Id (Attribute_Name (N)) = Attribute_Result
then
Attribute_Result_Mentioned := True;
return Abandon;
when N_Identifier |
N_Expanded_Name =>
+
declare
E : constant Entity_Id := Entity (N);
begin
loop
Arg := First (Pragma_Argument_Associations (Prag));
- -- Since pre- and postconditions are listed in reverse order, the
+ -- Since pre- and post-conditions are listed in reverse order, the
-- first postcondition in the list is the last in the source.
if Pragma_Name (Prag) = Name_Postcondition
and then not Class
then
Post_State_Mentioned := False;
- Ignored := Find_Post_State (Arg);
+ Ignored := Find_Post_State (Arg);
if not Post_State_Mentioned then
Error_Msg_N ("?postcondition only refers to pre-state",
-- Code is currently commented out as, in some cases, it causes crashes
-- because Direct_Primitive_Operations is not available for a private
- -- type. This may cause more warnings to be issued than necessary.
+ -- type. This may cause more warnings to be issued than necessary. ???
-- for J in Inherited'Range loop
-- if Present (Spec_PPC_List (Contract (Inherited (J)))) then
procedure Check_Subprogram_Order (N : Node_Id) is
function Subprogram_Name_Greater (S1, S2 : String) return Boolean;
- -- This is used to check if S1 > S2 in the sense required by this
- -- test, for example nameab < namec, but name2 < name10.
+ -- This is used to check if S1 > S2 in the sense required by this test,
+ -- for example nameab < namec, but name2 < name10.
-----------------------------
-- Subprogram_Name_Greater --