+2012-07-30 Robert Dewar <dewar@adacore.com>
+
+ * par_sco.adb, a-cihama.adb, a-coinve.adb, exp_ch7.adb, a-ciorse.adb,
+ exp_ch9.adb, sem_dim.adb, par-ch13.adb, sem_ch9.adb, a-cidlli.adb,
+ a-cimutr.adb, freeze.adb, a-ciormu.adb, sem_res.adb, sem_attr.adb,
+ a-cihase.adb, exp_ch4.adb, sem_ch4.adb, a-ciorma.adb,
+ s-tasinf-linux.ads, sem_ch13.adb, a-coinho.adb: Minor reformatting.
+ Add comments.
+
2012-07-30 Vincent Pucci <pucci@adacore.com>
* sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035). We don't unsuppress the check on the
-- allocator in the loop below, because the one in this block would
-- have failed already.
+ pragma Unsuppress (Accessibility_Check);
+
Element : Element_Access := new Element_Type'(New_Item);
+
begin
New_Node := new Node_Type'(Element, null, null);
+
exception
when others =>
Free (Element);
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+ pragma Unsuppress (Accessibility_Check);
+
X : Element_Access := Position.Node.Element;
+
begin
Position.Node.Element := new Element_Type'(New_Item);
Free (X);
Position.Node.Key := new Key_Type'(Key);
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
K : Key_Access := new Key_Type'(Key);
E : Element_Access;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+ pragma Unsuppress (Accessibility_Check);
+
begin
E := new Element_Type'(New_Item);
return new Node_Type'(K, E, Next);
+
exception
when others =>
Free_Key (K);
Node.Key := new Key_Type'(Key);
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
declare
X : Element_Access := Position.Node.Element;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
Free_Element (X);
procedure Assign (Node : Node_Access; Item : Element_Type) is
X : Element_Access := Node.Element;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case the
-- actual type is class-wide or has access discriminants (RM 4.8(10.1)
-- and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item);
Free_Element (X);
begin
if Target'Address = Source'Address then
return;
+ else
+ Target.Clear;
+ Target.Union (Source);
end if;
-
- Target.Clear;
- Target.Union (Source);
end Assign;
--------------
X := Position.Node.Element;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
end;
--------------
function New_Node (Next : Node_Access) return Node_Access is
- pragma Unsuppress (Accessibility_Check);
+
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+ pragma Unsuppress (Accessibility_Check);
+
Element : Element_Access := new Element_Type'(New_Item);
+
begin
return new Node_Type'(Element, Next);
+
exception
when others =>
Free_Element (Element);
Local_Insert (HT, New_Item, Node, Inserted);
- if Inserted
- and then HT.Length > HT_Ops.Capacity (HT)
- then
+ if Inserted and then HT.Length > HT_Ops.Capacity (HT) then
HT_Ops.Reserve_Capacity (HT, HT.Length);
end if;
end Insert;
X := Node.Element;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(New_Item);
end;
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035). We don't unsuppress the check on the
-- allocator in the loop below, because the one in this block would
-- have failed already.
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Element := new Element_Type'(New_Item);
end;
Position.Container := Parent.Container;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035). We don't unsuppress the check on the
-- allocator in the loop below, because the one in this block would
-- have failed already.
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Element := new Element_Type'(New_Item);
end;
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035). We don't unsuppress the check on the
-- allocator in the loop below, because the one in this block would
-- have failed already.
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Element := new Element_Type'(New_Item);
end;
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
E := new Element_Type'(New_Item);
end;
Position.Node.Key := new Key_Type'(Key);
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
function New_Node return Node_Access is
Node : Node_Access := new Node_Type;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Key := new Key_Type'(Key);
Node.Element := new Element_Type'(New_Item);
exception
when others =>
- -- On exception, deallocate key and elem
+ -- On exception, deallocate key and elem. Note that free
+ -- deallocates both the key and the elem.
- Free (Node); -- Note that Free deallocates key and elem too
+ Free (Node);
raise;
end New_Node;
Node.Key := new Key_Type'(Key);
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(New_Item);
+
exception
when others =>
Free_Key (K);
declare
X : Element_Access := Position.Node.Element;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Position.Node.Element := new Element_Type'(New_Item);
Free_Element (X);
--------------
function New_Node return Node_Access is
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+ pragma Unsuppress (Accessibility_Check);
+
Element : Element_Access := new Element_Type'(New_Item);
begin
Right => null,
Color => Red_Black_Trees.Red,
Element => Element);
+
exception
when others =>
Free_Element (Element);
declare
X : Element_Access := Node.Element;
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item);
Free_Element (X);
--------------
function New_Node return Node_Access is
- pragma Unsuppress (Accessibility_Check);
+
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item); -- OK if fails
Node.Color := Red_Black_Trees.Red;
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
X := Position.Node.Element;
Position.Node.Element := new Element_Type'(New_Item);
--------------
function New_Node return Node_Access is
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+ pragma Unsuppress (Accessibility_Check);
+
Element : Element_Access := new Element_Type'(New_Item);
begin
Right => null,
Color => Red_Black_Trees.Red,
Element => Element);
+
exception
when others =>
Free_Element (Element);
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
X := Node.Element;
Node.Element := new Element_Type'(New_Item);
--------------
function New_Node return Node_Access is
- pragma Unsuppress (Accessibility_Check);
+
-- The element allocator may need an accessibility check in the case
-- the actual type is class-wide or has access discriminants (see
-- RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item); -- OK if fails
Node.Color := Red;
-- Start of processing for Replace_Element
begin
- if Item < Node.Element.all
- or else Node.Element.all < Item
- then
+ if Item < Node.Element.all or else Node.Element.all < Item then
null;
else
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item);
Free_Element (X);
end if;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Node.Element := new Element_Type'(Item);
Free_Element (X);
declare
X : Element_Access := Container.Element;
- pragma Unsuppress (Accessibility_Check);
-- Element allocator may need an accessibility check in case actual
-- type is class-wide or has access discriminants (RM 4.8(10.1) and
-- AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Container.Element := new Element_Type'(New_Item);
Free (X);
---------------
function To_Holder (New_Item : Element_Type) return Holder is
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case the
-- actual type is class-wide or has access discriminants (RM 4.8(10.1)
-- and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
return (AF.Controlled with new Element_Type'(New_Item), 0);
end To_Holder;
-- storage available, or because element initialization fails).
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the
-- case actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Container.Elements.EA (Idx) := new Element_Type'(New_Item);
end;
-- initialization fails).
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check
-- in case the actual type is class-wide or has access
-- discriminants (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
E (Idx) := new Element_Type'(New_Item);
end;
-- K always has a value if the exception handler triggers.
K := Before;
+
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in
-- the case the actual type is class-wide or has access
-- discriminants (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
while K < Index loop
E (K) := new Element_Type'(New_Item);
-- initialization fails).
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in
-- the case the actual type is class-wide or has access
-- discriminants (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Dst.EA (Idx) := new Element_Type'(New_Item);
end;
-- let it propagate.
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in
-- the case the actual type is class-wide or has access
-- discriminants (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Dst.EA (Idx) := new Element_Type'(New_Item);
end;
declare
X : Element_Access := Container.Elements.EA (Index);
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- where the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Container.Elements.EA (Index) := new Element_Type'(New_Item);
Free (X);
declare
X : Element_Access := Container.Elements.EA (Position.Index);
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- where the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
Container.Elements.EA (Position.Index) := new Element_Type'(New_Item);
Free (X);
Last := Index_Type'First;
declare
- pragma Unsuppress (Accessibility_Check);
-- The element allocator may need an accessibility check in the case
-- where the actual type is class-wide or has access discriminants
-- (see RM 4.8(10.1) and AI12-0035).
+
+ pragma Unsuppress (Accessibility_Check);
+
begin
loop
Elements.EA (Last) := new Element_Type'(New_Item);
or else
(Is_Class_Wide_Type (Etype (Exp))
and then Scope (PtrT) /= Current_Scope))
- and then
- (Tagged_Type_Expansion or else VM_Target /= No_VM)
+ and then (Tagged_Type_Expansion or else VM_Target /= No_VM)
then
-- If the allocator was built in place, Ref is already a reference
-- to the access object initialized to the result of the allocator
-- finalization blocks, and we put everything into a wrapper
-- block to clearly expose the construct to the back-end.
+ -- This requirement for "clearly expose" must be properly
+ -- documented in sinfo/einfo ???
+
if Present (Prev_Fin) then
Insert_Before_And_Analyze (Prev_Fin, Fin_Block);
else
procedure Ensure_Statement_Present (Loc : Source_Ptr; Alt : Node_Id) is
Stmt : Node_Id;
+
begin
if Opt.Suppress_Control_Flow_Optimizations
and then Is_Empty_List (Statements (Alt))
-- Mark NULL statement as coming from source so that it is not
-- eliminated by GIGI.
+ -- Another covert channel! If this is a requirement, it must be
+ -- documented in sinfo/einfo ???
+
Set_Comes_From_Source (Stmt, True);
Set_Statements (Alt, New_List (Stmt));
-- Pre/post conditions are implemented through a subprogram in
-- the corresponding body, and therefore are not checked on an
- -- imported subprogram, for which the body is not available.
+ -- imported subprogram for which the body is not available.
-- Could consider generating a wrapper to take care of this???
Ptr : Source_Ptr;
begin
-
-- Aspect Specification is present
Ptr := Token_Ptr;
-- Otherwise we have an illegal range attribute. Note that P_Name
-- ensures that Token = Tok_Range is the only possibility left here.
- else -- Token = Tok_Range
+ else
Error_Msg_SC ("RANGE attribute illegal here!");
raise Error_Resync;
end if;
-
end P_Code_Statement;
end Ch13;
-- For entry guard, the token sloc is from the N_Entry_Body.
-- For PRAGMA, we must get the location from the pragma node.
- -- Argument N is the pragma argument, and we have to go up two
- -- levels (through the pragma argument association) to get to
- -- the pragma node itself. For the guard on a select
- -- alternative, we do not have access to the token location
- -- for the WHEN, so we use the first sloc of the condition
- -- itself (note: we use First_Sloc, not Sloc, because this is
- -- what is referenced by dominance markers).
+ -- Argument N is the pragma argument, and we have to go up
+ -- two levels (through the pragma argument association) to
+ -- get to the pragma node itself. For the guard on a select
+ -- alternative, we do not have access to the token location for
+ -- the WHEN, so we use the first sloc of the condition itself
+ -- (note: we use First_Sloc, not Sloc, because this is what is
+ -- referenced by dominance markers).
+
+ -- Doesn't this requirement of using First_Sloc need to be
+ -- documented in the spec ???
if Nkind_In (Parent (N), N_Accept_Alternative,
N_Delay_Alternative,
pragma Elaborate_Body;
-- To ensure that a body is allowed
- -- Linux provides a way to define the ideal processor to use for a given
- -- thread. The ideal processor is not necessarily the one that will be used
- -- by the OS but the OS will always try to schedule this thread to the
- -- specified processor if it is available.
+ -- The Linux kernel provides a way to define the ideal processor to use for
+ -- a given thread. The ideal processor is not necessarily the one that will
+ -- be used by the OS but the OS will always try to schedule this thread to
+ -- the specified processor if it is available.
-- The Task_Info pragma:
-- within the subprogram itself. If the prefix includes a function
-- call it may involve finalization actions that should only be
-- inserted when the attribute has been rewritten as a declarations.
- -- As a result, if the prefix is not a simple name we create a
- -- declaration for it now, and insert it at the start of the
- -- enclosing subprogram. This is properly an expansion activity but
- -- it has to be performed now to prevent out-of-order issues.
+ -- As a result, if the prefix is not a simple name we create
+ -- a declaration for it now, and insert it at the start of the
+ -- enclosing subprogram. This is properly an expansion activity
+ -- but it has to be performed now to prevent out-of-order issues.
if not Is_Entity_Name (P) then
P_Type := Base_Type (P_Type);
Check_Decimal_Fixed_Point_Type;
Set_Etype (N, P_Base_Type);
- -- Because the context is universal_real (3.5.10(12)) it is a legal
- -- context for a universal fixed expression. This is the only
- -- attribute whose functional description involves U_R.
+ -- Because the context is universal_real (3.5.10(12)) it is a
+ -- legal context for a universal fixed expression. This is the
+ -- only attribute whose functional description involves U_R.
if Etype (E1) = Universal_Fixed then
declare
Validate_Remote_Access_To_Class_Wide_Type (N);
- -- The prefix is allowed to be an implicit dereference
- -- of an access value designating a task.
+ -- The prefix is allowed to be an implicit dereference of an
+ -- access value designating a task.
else
Check_Task_Prefix;
Chars => Name_Address,
Expression => Expression (N)));
- -- We preserve Comes_From_Source, since logically the clause still
- -- comes from the source program even though it is changed in form.
+ -- We preserve Comes_From_Source, since logically the clause still comes
+ -- from the source program even though it is changed in form.
Set_Comes_From_Source (N, CS);
-- Legality checks on the address clause for initialized
-- objects is deferred until the freeze point, because
- -- a subsequent pragma might indicate that the object is
- -- imported and thus not initialized.
+ -- a subsequent pragma might indicate that the object
+ -- is imported and thus not initialized.
Set_Has_Delayed_Freeze (U_Ent);
when Attribute_Implicit_Dereference =>
- -- Legality checks already performed at the point of
- -- the type declaration, aspect is not delayed.
+ -- Legality checks already performed at the point of the type
+ -- declaration, aspect is not delayed.
null;
begin
Set_Parent (Par, Parent (Parent (N)));
+
if Try_Object_Operation
- (Sinfo.Name (Par), CW_Test_Only => True)
+ (Sinfo.Name (Par), CW_Test_Only => True)
then
return;
end if;
declare
Arg : Node_Id;
-
begin
Arg := First (Exprs);
while Present (Arg) loop
if not Is_Overloaded (Func_Name) then
Func := Entity (Func_Name);
- Indexing := Make_Function_Call (Loc,
- Name => New_Occurrence_Of (Func, Loc),
- Parameter_Associations => Assoc);
+ Indexing :=
+ Make_Function_Call (Loc,
+ Name => New_Occurrence_Of (Func, Loc),
+ Parameter_Associations => Assoc);
Rewrite (N, Indexing);
Analyze (N);
end if;
if Etype (N) = Any_Type then
- Error_Msg_NE ("container cannot be indexed with&",
- N, Etype (First (Exprs)));
+ Error_Msg_NE
+ ("container cannot be indexed with&", N, Etype (First (Exprs)));
Rewrite (N, New_Occurrence_Of (Any_Id, Loc));
else
Analyze (N);
-----------------------
function Allows_Lock_Free_Implementation
- (N : Node_Id;
+ (N : Node_Id;
Lock_Free_Given : Boolean := False) return Boolean;
-- This routine returns True iff N satisfies the following list of lock-
-- free restrictions for protected type declaration and protected body:
-- when Lock_Free_Given is True.
begin
- pragma Assert (Nkind_In (N,
- N_Protected_Type_Declaration,
- N_Protected_Body));
+ pragma Assert (Nkind_In (N, N_Protected_Type_Declaration,
+ N_Protected_Body));
-- The lock-free implementation is currently enabled through a debug
-- flag. When Lock_Free_Given is True, an aspect Lock_Free forces the
and then Is_Access_Type (Etype (Prefix (N))))
then
if Lock_Free_Given then
- Error_Msg_N ("dereference of access value " &
- "not allowed", N);
+ Error_Msg_N
+ ("dereference of access value not allowed", N);
return Skip;
end if;
and then not Is_Static_Expression (N)
then
if Lock_Free_Given then
- Error_Msg_N ("non-static function call not allowed",
- N);
+ Error_Msg_N
+ ("non-static function call not allowed", N);
return Skip;
end if;
-- outside the protected subprogram scope.
if Ekind (Id) in Assignable_Kind
- and then not Scope_Within_Or_Same (Scope (Id),
- Sub_Id)
- and then not Scope_Within_Or_Same (Scope (Id),
- Protected_Body_Subprogram (Sub_Id))
+ and then not
+ Scope_Within_Or_Same (Scope (Id), Sub_Id)
+ and then not
+ Scope_Within_Or_Same
+ (Scope (Id),
+ Protected_Body_Subprogram (Sub_Id))
then
if Lock_Free_Given then
Error_Msg_NE
and then (not Lock_Free_Given
or else Errors_Count = Serious_Errors_Detected)
then
-
-- Establish a relation between the subprogram body and the
-- unique protected component it references.
-- entity when the object is a constant whose type is a
-- dimensioned type.
- if Constant_Present (N)
- and then not Exists (Dim_Of_Etyp)
- then
+ if Constant_Present (N) and then not Exists (Dim_Of_Etyp) then
Set_Dimensions (Id, Dim_Of_Expr);
-- Otherwise, issue an error message
return;
end if;
- else
- -- If not overloaded, resolve P with its own type
+ -- If not overloaded, resolve P with its own type
+ else
Resolve (P);
end if;