mirror of git://gcc.gnu.org/git/gcc.git
par_sco.adb, [...]: Minor reformatting.
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. From-SVN: r189977
This commit is contained in:
parent
b5059fa089
commit
29ba9f52ee
|
|
@ -1,3 +1,12 @@
|
||||||
|
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>
|
2012-07-30 Vincent Pucci <pucci@adacore.com>
|
||||||
|
|
||||||
* sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
|
* sem_ch9.adb (Allows_Lock_Free_Implementation): Restrict implicit
|
||||||
|
|
|
||||||
|
|
@ -888,16 +888,19 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- 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
|
-- 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
|
-- allocator in the loop below, because the one in this block would
|
||||||
-- have failed already.
|
-- have failed already.
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
Element : Element_Access := new Element_Type'(New_Item);
|
Element : Element_Access := new Element_Type'(New_Item);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
New_Node := new Node_Type'(Element, null, null);
|
New_Node := new Node_Type'(Element, null, null);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free (Element);
|
Free (Element);
|
||||||
|
|
@ -1468,12 +1471,14 @@ package body Ada.Containers.Indefinite_Doubly_Linked_Lists is
|
||||||
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
|
pragma Assert (Vet (Position), "bad cursor in Replace_Element");
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
X : Element_Access := Position.Node.Element;
|
X : Element_Access := Position.Node.Element;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
Free (X);
|
Free (X);
|
||||||
|
|
|
||||||
|
|
@ -695,12 +695,15 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
|
||||||
Position.Node.Key := new Key_Type'(Key);
|
Position.Node.Key := new Key_Type'(Key);
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Key (K);
|
Free_Key (K);
|
||||||
|
|
@ -736,14 +739,16 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
|
||||||
K : Key_Access := new Key_Type'(Key);
|
K : Key_Access := new Key_Type'(Key);
|
||||||
E : Element_Access;
|
E : Element_Access;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
E := new Element_Type'(New_Item);
|
E := new Element_Type'(New_Item);
|
||||||
return new Node_Type'(K, E, Next);
|
return new Node_Type'(K, E, Next);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Key (K);
|
Free_Key (K);
|
||||||
|
|
@ -1177,12 +1182,15 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
|
||||||
Node.Key := new Key_Type'(Key);
|
Node.Key := new Key_Type'(Key);
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(New_Item);
|
Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Key (K);
|
Free_Key (K);
|
||||||
|
|
@ -1230,10 +1238,12 @@ package body Ada.Containers.Indefinite_Hashed_Maps is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Position.Node.Element;
|
X : Element_Access := Position.Node.Element;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
|
||||||
|
|
@ -186,10 +186,12 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
procedure Assign (Node : Node_Access; Item : Element_Type) is
|
procedure Assign (Node : Node_Access; Item : Element_Type) is
|
||||||
X : Element_Access := Node.Element;
|
X : Element_Access := Node.Element;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case the
|
-- 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)
|
-- actual type is class-wide or has access discriminants (RM 4.8(10.1)
|
||||||
-- and AI12-0035).
|
-- and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item);
|
Node.Element := new Element_Type'(Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
@ -199,10 +201,10 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
begin
|
begin
|
||||||
if Target'Address = Source'Address then
|
if Target'Address = Source'Address then
|
||||||
return;
|
return;
|
||||||
|
else
|
||||||
|
Target.Clear;
|
||||||
|
Target.Union (Source);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
Target.Clear;
|
|
||||||
Target.Union (Source);
|
|
||||||
end Assign;
|
end Assign;
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
@ -813,10 +815,12 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
X := Position.Node.Element;
|
X := Position.Node.Element;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -875,14 +879,18 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
function New_Node (Next : Node_Access) return Node_Access is
|
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 element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
Element : Element_Access := new Element_Type'(New_Item);
|
Element : Element_Access := new Element_Type'(New_Item);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
return new Node_Type'(Element, Next);
|
return new Node_Type'(Element, Next);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Element (Element);
|
Free_Element (Element);
|
||||||
|
|
@ -898,9 +906,7 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
|
|
||||||
Local_Insert (HT, New_Item, Node, Inserted);
|
Local_Insert (HT, New_Item, Node, Inserted);
|
||||||
|
|
||||||
if Inserted
|
if Inserted and then HT.Length > HT_Ops.Capacity (HT) then
|
||||||
and then HT.Length > HT_Ops.Capacity (HT)
|
|
||||||
then
|
|
||||||
HT_Ops.Reserve_Capacity (HT, HT.Length);
|
HT_Ops.Reserve_Capacity (HT, HT.Length);
|
||||||
end if;
|
end if;
|
||||||
end Insert;
|
end Insert;
|
||||||
|
|
@ -1335,10 +1341,12 @@ package body Ada.Containers.Indefinite_Hashed_Sets is
|
||||||
X := Node.Element;
|
X := Node.Element;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(New_Item);
|
Node.Element := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -292,12 +292,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- 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
|
-- 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
|
-- allocator in the loop below, because the one in this block would
|
||||||
-- have failed already.
|
-- have failed already.
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Element := new Element_Type'(New_Item);
|
Element := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1251,12 +1253,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
|
||||||
Position.Container := Parent.Container;
|
Position.Container := Parent.Container;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- 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
|
-- 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
|
-- allocator in the loop below, because the one in this block would
|
||||||
-- have failed already.
|
-- have failed already.
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Element := new Element_Type'(New_Item);
|
Element := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1826,12 +1830,14 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- 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
|
-- 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
|
-- allocator in the loop below, because the one in this block would
|
||||||
-- have failed already.
|
-- have failed already.
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Element := new Element_Type'(New_Item);
|
Element := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -2194,10 +2200,12 @@ package body Ada.Containers.Indefinite_Multiway_Trees is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
E := new Element_Type'(New_Item);
|
E := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
|
||||||
|
|
@ -813,12 +813,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
|
||||||
Position.Node.Key := new Key_Type'(Key);
|
Position.Node.Key := new Key_Type'(Key);
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Key (K);
|
Free_Key (K);
|
||||||
|
|
@ -857,10 +860,12 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
|
||||||
function New_Node return Node_Access is
|
function New_Node return Node_Access is
|
||||||
Node : Node_Access := new Node_Type;
|
Node : Node_Access := new Node_Type;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Key := new Key_Type'(Key);
|
Node.Key := new Key_Type'(Key);
|
||||||
Node.Element := new Element_Type'(New_Item);
|
Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
@ -869,9 +874,10 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
|
||||||
exception
|
exception
|
||||||
when others =>
|
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;
|
raise;
|
||||||
end New_Node;
|
end New_Node;
|
||||||
|
|
||||||
|
|
@ -1502,12 +1508,15 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
|
||||||
Node.Key := new Key_Type'(Key);
|
Node.Key := new Key_Type'(Key);
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(New_Item);
|
Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Key (K);
|
Free_Key (K);
|
||||||
|
|
@ -1556,10 +1565,12 @@ package body Ada.Containers.Indefinite_Ordered_Maps is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Position.Node.Element;
|
X : Element_Access := Position.Node.Element;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
|
||||||
|
|
@ -1167,11 +1167,12 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
function New_Node return Node_Access is
|
function New_Node return Node_Access is
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
Element : Element_Access := new Element_Type'(New_Item);
|
Element : Element_Access := new Element_Type'(New_Item);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
@ -1180,6 +1181,7 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
|
||||||
Right => null,
|
Right => null,
|
||||||
Color => Red_Black_Trees.Red,
|
Color => Red_Black_Trees.Red,
|
||||||
Element => Element);
|
Element => Element);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Element (Element);
|
Free_Element (Element);
|
||||||
|
|
@ -1774,10 +1776,12 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Node.Element;
|
X : Element_Access := Node.Element;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item);
|
Node.Element := new Element_Type'(Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
@ -1803,10 +1807,13 @@ package body Ada.Containers.Indefinite_Ordered_Multisets is
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
function New_Node return Node_Access is
|
function New_Node return Node_Access is
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item); -- OK if fails
|
Node.Element := new Element_Type'(Item); -- OK if fails
|
||||||
Node.Color := Red_Black_Trees.Red;
|
Node.Color := Red_Black_Trees.Red;
|
||||||
|
|
|
||||||
|
|
@ -1174,10 +1174,12 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
X := Position.Node.Element;
|
X := Position.Node.Element;
|
||||||
Position.Node.Element := new Element_Type'(New_Item);
|
Position.Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
@ -1245,11 +1247,12 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
function New_Node return Node_Access is
|
function New_Node return Node_Access is
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
Element : Element_Access := new Element_Type'(New_Item);
|
Element : Element_Access := new Element_Type'(New_Item);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
@ -1258,6 +1261,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
Right => null,
|
Right => null,
|
||||||
Color => Red_Black_Trees.Red,
|
Color => Red_Black_Trees.Red,
|
||||||
Element => Element);
|
Element => Element);
|
||||||
|
|
||||||
exception
|
exception
|
||||||
when others =>
|
when others =>
|
||||||
Free_Element (Element);
|
Free_Element (Element);
|
||||||
|
|
@ -1831,10 +1835,12 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
X := Node.Element;
|
X := Node.Element;
|
||||||
Node.Element := new Element_Type'(New_Item);
|
Node.Element := new Element_Type'(New_Item);
|
||||||
|
|
@ -1873,10 +1879,13 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
function New_Node return Node_Access is
|
function New_Node return Node_Access is
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- the actual type is class-wide or has access discriminants (see
|
-- the actual type is class-wide or has access discriminants (see
|
||||||
-- RM 4.8(10.1) and AI12-0035).
|
-- RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item); -- OK if fails
|
Node.Element := new Element_Type'(Item); -- OK if fails
|
||||||
Node.Color := Red;
|
Node.Color := Red;
|
||||||
|
|
@ -1895,9 +1904,7 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
-- Start of processing for Replace_Element
|
-- Start of processing for Replace_Element
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Item < Node.Element.all
|
if Item < Node.Element.all or else Node.Element.all < Item then
|
||||||
or else Node.Element.all < Item
|
|
||||||
then
|
|
||||||
null;
|
null;
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
@ -1907,10 +1914,12 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case the actual type is class-wide or has access discriminants
|
-- case the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item);
|
Node.Element := new Element_Type'(Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
@ -1932,10 +1941,12 @@ package body Ada.Containers.Indefinite_Ordered_Sets is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case actual type is class-wide or has access discriminants
|
-- case actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Node.Element := new Element_Type'(Item);
|
Node.Element := new Element_Type'(Item);
|
||||||
Free_Element (X);
|
Free_Element (X);
|
||||||
|
|
|
||||||
|
|
@ -223,10 +223,12 @@ package body Ada.Containers.Indefinite_Holders is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Container.Element;
|
X : Element_Access := Container.Element;
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- Element allocator may need an accessibility check in case actual
|
-- Element allocator may need an accessibility check in case actual
|
||||||
-- type is class-wide or has access discriminants (RM 4.8(10.1) and
|
-- type is class-wide or has access discriminants (RM 4.8(10.1) and
|
||||||
-- AI12-0035).
|
-- AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Container.Element := new Element_Type'(New_Item);
|
Container.Element := new Element_Type'(New_Item);
|
||||||
Free (X);
|
Free (X);
|
||||||
|
|
@ -238,10 +240,12 @@ package body Ada.Containers.Indefinite_Holders is
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
function To_Holder (New_Item : Element_Type) return Holder is
|
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
|
-- 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)
|
-- actual type is class-wide or has access discriminants (RM 4.8(10.1)
|
||||||
-- and AI12-0035).
|
-- and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
return (AF.Controlled with new Element_Type'(New_Item), 0);
|
return (AF.Controlled with new Element_Type'(New_Item), 0);
|
||||||
end To_Holder;
|
end To_Holder;
|
||||||
|
|
|
||||||
|
|
@ -1699,10 +1699,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
-- storage available, or because element initialization fails).
|
-- storage available, or because element initialization fails).
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the
|
-- The element allocator may need an accessibility check in the
|
||||||
-- case actual type is class-wide or has access discriminants
|
-- case actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Container.Elements.EA (Idx) := new Element_Type'(New_Item);
|
Container.Elements.EA (Idx) := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1752,10 +1754,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
-- initialization fails).
|
-- initialization fails).
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check
|
-- The element allocator may need an accessibility check
|
||||||
-- in case the actual type is class-wide or has access
|
-- in case the actual type is class-wide or has access
|
||||||
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
E (Idx) := new Element_Type'(New_Item);
|
E (Idx) := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1794,11 +1798,14 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
-- K always has a value if the exception handler triggers.
|
-- K always has a value if the exception handler triggers.
|
||||||
|
|
||||||
K := Before;
|
K := Before;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in
|
-- The element allocator may need an accessibility check in
|
||||||
-- the case the actual type is class-wide or has access
|
-- the case the actual type is class-wide or has access
|
||||||
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
while K < Index loop
|
while K < Index loop
|
||||||
E (K) := new Element_Type'(New_Item);
|
E (K) := new Element_Type'(New_Item);
|
||||||
|
|
@ -1905,10 +1912,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
-- initialization fails).
|
-- initialization fails).
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in
|
-- The element allocator may need an accessibility check in
|
||||||
-- the case the actual type is class-wide or has access
|
-- the case the actual type is class-wide or has access
|
||||||
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Dst.EA (Idx) := new Element_Type'(New_Item);
|
Dst.EA (Idx) := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -1952,10 +1961,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
-- let it propagate.
|
-- let it propagate.
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in
|
-- The element allocator may need an accessibility check in
|
||||||
-- the case the actual type is class-wide or has access
|
-- the case the actual type is class-wide or has access
|
||||||
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
-- discriminants (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Dst.EA (Idx) := new Element_Type'(New_Item);
|
Dst.EA (Idx) := new Element_Type'(New_Item);
|
||||||
end;
|
end;
|
||||||
|
|
@ -3208,10 +3219,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Container.Elements.EA (Index);
|
X : Element_Access := Container.Elements.EA (Index);
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- where the actual type is class-wide or has access discriminants
|
-- where the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Container.Elements.EA (Index) := new Element_Type'(New_Item);
|
Container.Elements.EA (Index) := new Element_Type'(New_Item);
|
||||||
Free (X);
|
Free (X);
|
||||||
|
|
@ -3244,10 +3257,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
declare
|
declare
|
||||||
X : Element_Access := Container.Elements.EA (Position.Index);
|
X : Element_Access := Container.Elements.EA (Position.Index);
|
||||||
|
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- where the actual type is class-wide or has access discriminants
|
-- where the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Container.Elements.EA (Position.Index) := new Element_Type'(New_Item);
|
Container.Elements.EA (Position.Index) := new Element_Type'(New_Item);
|
||||||
Free (X);
|
Free (X);
|
||||||
|
|
@ -3993,10 +4008,12 @@ package body Ada.Containers.Indefinite_Vectors is
|
||||||
Last := Index_Type'First;
|
Last := Index_Type'First;
|
||||||
|
|
||||||
declare
|
declare
|
||||||
pragma Unsuppress (Accessibility_Check);
|
|
||||||
-- The element allocator may need an accessibility check in the case
|
-- The element allocator may need an accessibility check in the case
|
||||||
-- where the actual type is class-wide or has access discriminants
|
-- where the actual type is class-wide or has access discriminants
|
||||||
-- (see RM 4.8(10.1) and AI12-0035).
|
-- (see RM 4.8(10.1) and AI12-0035).
|
||||||
|
|
||||||
|
pragma Unsuppress (Accessibility_Check);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
loop
|
loop
|
||||||
Elements.EA (Last) := new Element_Type'(New_Item);
|
Elements.EA (Last) := new Element_Type'(New_Item);
|
||||||
|
|
|
||||||
|
|
@ -705,8 +705,7 @@ package body Exp_Ch4 is
|
||||||
or else
|
or else
|
||||||
(Is_Class_Wide_Type (Etype (Exp))
|
(Is_Class_Wide_Type (Etype (Exp))
|
||||||
and then Scope (PtrT) /= Current_Scope))
|
and then Scope (PtrT) /= Current_Scope))
|
||||||
and then
|
and then (Tagged_Type_Expansion or else VM_Target /= No_VM)
|
||||||
(Tagged_Type_Expansion or else VM_Target /= No_VM)
|
|
||||||
then
|
then
|
||||||
-- If the allocator was built in place, Ref is already a reference
|
-- If the allocator was built in place, Ref is already a reference
|
||||||
-- to the access object initialized to the result of the allocator
|
-- to the access object initialized to the result of the allocator
|
||||||
|
|
|
||||||
|
|
@ -4568,6 +4568,9 @@ package body Exp_Ch7 is
|
||||||
-- finalization blocks, and we put everything into a wrapper
|
-- finalization blocks, and we put everything into a wrapper
|
||||||
-- block to clearly expose the construct to the back-end.
|
-- 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
|
if Present (Prev_Fin) then
|
||||||
Insert_Before_And_Analyze (Prev_Fin, Fin_Block);
|
Insert_Before_And_Analyze (Prev_Fin, Fin_Block);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -5485,6 +5485,7 @@ package body Exp_Ch9 is
|
||||||
|
|
||||||
procedure Ensure_Statement_Present (Loc : Source_Ptr; Alt : Node_Id) is
|
procedure Ensure_Statement_Present (Loc : Source_Ptr; Alt : Node_Id) is
|
||||||
Stmt : Node_Id;
|
Stmt : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
if Opt.Suppress_Control_Flow_Optimizations
|
if Opt.Suppress_Control_Flow_Optimizations
|
||||||
and then Is_Empty_List (Statements (Alt))
|
and then Is_Empty_List (Statements (Alt))
|
||||||
|
|
@ -5494,6 +5495,9 @@ package body Exp_Ch9 is
|
||||||
-- Mark NULL statement as coming from source so that it is not
|
-- Mark NULL statement as coming from source so that it is not
|
||||||
-- eliminated by GIGI.
|
-- 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_Comes_From_Source (Stmt, True);
|
||||||
|
|
||||||
Set_Statements (Alt, New_List (Stmt));
|
Set_Statements (Alt, New_List (Stmt));
|
||||||
|
|
|
||||||
|
|
@ -3029,7 +3029,7 @@ package body Freeze is
|
||||||
|
|
||||||
-- Pre/post conditions are implemented through a subprogram in
|
-- Pre/post conditions are implemented through a subprogram in
|
||||||
-- the corresponding body, and therefore are not checked on an
|
-- 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???
|
-- Could consider generating a wrapper to take care of this???
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -645,7 +645,6 @@ package body Ch13 is
|
||||||
Ptr : Source_Ptr;
|
Ptr : Source_Ptr;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
||||||
-- Aspect Specification is present
|
-- Aspect Specification is present
|
||||||
|
|
||||||
Ptr := Token_Ptr;
|
Ptr := Token_Ptr;
|
||||||
|
|
@ -834,11 +833,10 @@ package body Ch13 is
|
||||||
-- Otherwise we have an illegal range attribute. Note that P_Name
|
-- Otherwise we have an illegal range attribute. Note that P_Name
|
||||||
-- ensures that Token = Tok_Range is the only possibility left here.
|
-- ensures that Token = Tok_Range is the only possibility left here.
|
||||||
|
|
||||||
else -- Token = Tok_Range
|
else
|
||||||
Error_Msg_SC ("RANGE attribute illegal here!");
|
Error_Msg_SC ("RANGE attribute illegal here!");
|
||||||
raise Error_Resync;
|
raise Error_Resync;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
end P_Code_Statement;
|
end P_Code_Statement;
|
||||||
|
|
||||||
end Ch13;
|
end Ch13;
|
||||||
|
|
|
||||||
|
|
@ -492,13 +492,16 @@ package body Par_SCO is
|
||||||
|
|
||||||
-- For entry guard, the token sloc is from the N_Entry_Body.
|
-- For entry guard, the token sloc is from the N_Entry_Body.
|
||||||
-- For PRAGMA, we must get the location from the pragma node.
|
-- For PRAGMA, we must get the location from the pragma node.
|
||||||
-- Argument N is the pragma argument, and we have to go up two
|
-- Argument N is the pragma argument, and we have to go up
|
||||||
-- levels (through the pragma argument association) to get to
|
-- two levels (through the pragma argument association) to
|
||||||
-- the pragma node itself. For the guard on a select
|
-- get to the pragma node itself. For the guard on a select
|
||||||
-- alternative, we do not have access to the token location
|
-- alternative, we do not have access to the token location for
|
||||||
-- for the WHEN, so we use the first sloc of the condition
|
-- the WHEN, so we use the first sloc of the condition itself
|
||||||
-- itself (note: we use First_Sloc, not Sloc, because this is
|
-- (note: we use First_Sloc, not Sloc, because this is what is
|
||||||
-- what is referenced by dominance markers).
|
-- 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,
|
if Nkind_In (Parent (N), N_Accept_Alternative,
|
||||||
N_Delay_Alternative,
|
N_Delay_Alternative,
|
||||||
|
|
|
||||||
|
|
@ -48,10 +48,10 @@ package System.Task_Info is
|
||||||
pragma Elaborate_Body;
|
pragma Elaborate_Body;
|
||||||
-- To ensure that a body is allowed
|
-- To ensure that a body is allowed
|
||||||
|
|
||||||
-- Linux provides a way to define the ideal processor to use for a given
|
-- The Linux kernel provides a way to define the ideal processor to use for
|
||||||
-- thread. The ideal processor is not necessarily the one that will be used
|
-- a given thread. The ideal processor is not necessarily the one that will
|
||||||
-- by the OS but the OS will always try to schedule this thread to the
|
-- be used by the OS but the OS will always try to schedule this thread to
|
||||||
-- specified processor if it is available.
|
-- the specified processor if it is available.
|
||||||
|
|
||||||
-- The Task_Info pragma:
|
-- The Task_Info pragma:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4029,10 +4029,10 @@ package body Sem_Attr is
|
||||||
-- within the subprogram itself. If the prefix includes a function
|
-- within the subprogram itself. If the prefix includes a function
|
||||||
-- call it may involve finalization actions that should only be
|
-- call it may involve finalization actions that should only be
|
||||||
-- inserted when the attribute has been rewritten as a declarations.
|
-- inserted when the attribute has been rewritten as a declarations.
|
||||||
-- As a result, if the prefix is not a simple name we create a
|
-- As a result, if the prefix is not a simple name we create
|
||||||
-- declaration for it now, and insert it at the start of the
|
-- a declaration for it now, and insert it at the start of the
|
||||||
-- enclosing subprogram. This is properly an expansion activity but
|
-- enclosing subprogram. This is properly an expansion activity
|
||||||
-- it has to be performed now to prevent out-of-order issues.
|
-- but it has to be performed now to prevent out-of-order issues.
|
||||||
|
|
||||||
if not Is_Entity_Name (P) then
|
if not Is_Entity_Name (P) then
|
||||||
P_Type := Base_Type (P_Type);
|
P_Type := Base_Type (P_Type);
|
||||||
|
|
@ -4474,9 +4474,9 @@ package body Sem_Attr is
|
||||||
Check_Decimal_Fixed_Point_Type;
|
Check_Decimal_Fixed_Point_Type;
|
||||||
Set_Etype (N, P_Base_Type);
|
Set_Etype (N, P_Base_Type);
|
||||||
|
|
||||||
-- Because the context is universal_real (3.5.10(12)) it is a legal
|
-- Because the context is universal_real (3.5.10(12)) it is a
|
||||||
-- context for a universal fixed expression. This is the only
|
-- legal context for a universal fixed expression. This is the
|
||||||
-- attribute whose functional description involves U_R.
|
-- only attribute whose functional description involves U_R.
|
||||||
|
|
||||||
if Etype (E1) = Universal_Fixed then
|
if Etype (E1) = Universal_Fixed then
|
||||||
declare
|
declare
|
||||||
|
|
@ -4771,8 +4771,8 @@ package body Sem_Attr is
|
||||||
|
|
||||||
Validate_Remote_Access_To_Class_Wide_Type (N);
|
Validate_Remote_Access_To_Class_Wide_Type (N);
|
||||||
|
|
||||||
-- The prefix is allowed to be an implicit dereference
|
-- The prefix is allowed to be an implicit dereference of an
|
||||||
-- of an access value designating a task.
|
-- access value designating a task.
|
||||||
|
|
||||||
else
|
else
|
||||||
Check_Task_Prefix;
|
Check_Task_Prefix;
|
||||||
|
|
|
||||||
|
|
@ -1866,8 +1866,8 @@ package body Sem_Ch13 is
|
||||||
Chars => Name_Address,
|
Chars => Name_Address,
|
||||||
Expression => Expression (N)));
|
Expression => Expression (N)));
|
||||||
|
|
||||||
-- We preserve Comes_From_Source, since logically the clause still
|
-- We preserve Comes_From_Source, since logically the clause still comes
|
||||||
-- comes from the source program even though it is changed in form.
|
-- from the source program even though it is changed in form.
|
||||||
|
|
||||||
Set_Comes_From_Source (N, CS);
|
Set_Comes_From_Source (N, CS);
|
||||||
|
|
||||||
|
|
@ -2685,8 +2685,8 @@ package body Sem_Ch13 is
|
||||||
|
|
||||||
-- Legality checks on the address clause for initialized
|
-- Legality checks on the address clause for initialized
|
||||||
-- objects is deferred until the freeze point, because
|
-- objects is deferred until the freeze point, because
|
||||||
-- a subsequent pragma might indicate that the object is
|
-- a subsequent pragma might indicate that the object
|
||||||
-- imported and thus not initialized.
|
-- is imported and thus not initialized.
|
||||||
|
|
||||||
Set_Has_Delayed_Freeze (U_Ent);
|
Set_Has_Delayed_Freeze (U_Ent);
|
||||||
|
|
||||||
|
|
@ -3120,8 +3120,8 @@ package body Sem_Ch13 is
|
||||||
|
|
||||||
when Attribute_Implicit_Dereference =>
|
when Attribute_Implicit_Dereference =>
|
||||||
|
|
||||||
-- Legality checks already performed at the point of
|
-- Legality checks already performed at the point of the type
|
||||||
-- the type declaration, aspect is not delayed.
|
-- declaration, aspect is not delayed.
|
||||||
|
|
||||||
null;
|
null;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4231,8 +4231,9 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Set_Parent (Par, Parent (Parent (N)));
|
Set_Parent (Par, Parent (Parent (N)));
|
||||||
|
|
||||||
if Try_Object_Operation
|
if Try_Object_Operation
|
||||||
(Sinfo.Name (Par), CW_Test_Only => True)
|
(Sinfo.Name (Par), CW_Test_Only => True)
|
||||||
then
|
then
|
||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
|
@ -6531,7 +6532,6 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
declare
|
declare
|
||||||
Arg : Node_Id;
|
Arg : Node_Id;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Arg := First (Exprs);
|
Arg := First (Exprs);
|
||||||
while Present (Arg) loop
|
while Present (Arg) loop
|
||||||
|
|
@ -6542,9 +6542,10 @@ package body Sem_Ch4 is
|
||||||
|
|
||||||
if not Is_Overloaded (Func_Name) then
|
if not Is_Overloaded (Func_Name) then
|
||||||
Func := Entity (Func_Name);
|
Func := Entity (Func_Name);
|
||||||
Indexing := Make_Function_Call (Loc,
|
Indexing :=
|
||||||
Name => New_Occurrence_Of (Func, Loc),
|
Make_Function_Call (Loc,
|
||||||
Parameter_Associations => Assoc);
|
Name => New_Occurrence_Of (Func, Loc),
|
||||||
|
Parameter_Associations => Assoc);
|
||||||
Rewrite (N, Indexing);
|
Rewrite (N, Indexing);
|
||||||
Analyze (N);
|
Analyze (N);
|
||||||
|
|
||||||
|
|
@ -6609,8 +6610,8 @@ package body Sem_Ch4 is
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
if Etype (N) = Any_Type then
|
if Etype (N) = Any_Type then
|
||||||
Error_Msg_NE ("container cannot be indexed with&",
|
Error_Msg_NE
|
||||||
N, Etype (First (Exprs)));
|
("container cannot be indexed with&", N, Etype (First (Exprs)));
|
||||||
Rewrite (N, New_Occurrence_Of (Any_Id, Loc));
|
Rewrite (N, New_Occurrence_Of (Any_Id, Loc));
|
||||||
else
|
else
|
||||||
Analyze (N);
|
Analyze (N);
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ package body Sem_Ch9 is
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
function Allows_Lock_Free_Implementation
|
function Allows_Lock_Free_Implementation
|
||||||
(N : Node_Id;
|
(N : Node_Id;
|
||||||
Lock_Free_Given : Boolean := False) return Boolean;
|
Lock_Free_Given : Boolean := False) return Boolean;
|
||||||
-- This routine returns True iff N satisfies the following list of lock-
|
-- This routine returns True iff N satisfies the following list of lock-
|
||||||
-- free restrictions for protected type declaration and protected body:
|
-- free restrictions for protected type declaration and protected body:
|
||||||
|
|
@ -130,9 +130,8 @@ package body Sem_Ch9 is
|
||||||
-- when Lock_Free_Given is True.
|
-- when Lock_Free_Given is True.
|
||||||
|
|
||||||
begin
|
begin
|
||||||
pragma Assert (Nkind_In (N,
|
pragma Assert (Nkind_In (N, N_Protected_Type_Declaration,
|
||||||
N_Protected_Type_Declaration,
|
N_Protected_Body));
|
||||||
N_Protected_Body));
|
|
||||||
|
|
||||||
-- The lock-free implementation is currently enabled through a debug
|
-- The lock-free implementation is currently enabled through a debug
|
||||||
-- flag. When Lock_Free_Given is True, an aspect Lock_Free forces the
|
-- flag. When Lock_Free_Given is True, an aspect Lock_Free forces the
|
||||||
|
|
@ -418,8 +417,8 @@ package body Sem_Ch9 is
|
||||||
and then Is_Access_Type (Etype (Prefix (N))))
|
and then Is_Access_Type (Etype (Prefix (N))))
|
||||||
then
|
then
|
||||||
if Lock_Free_Given then
|
if Lock_Free_Given then
|
||||||
Error_Msg_N ("dereference of access value " &
|
Error_Msg_N
|
||||||
"not allowed", N);
|
("dereference of access value not allowed", N);
|
||||||
return Skip;
|
return Skip;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
@ -431,8 +430,8 @@ package body Sem_Ch9 is
|
||||||
and then not Is_Static_Expression (N)
|
and then not Is_Static_Expression (N)
|
||||||
then
|
then
|
||||||
if Lock_Free_Given then
|
if Lock_Free_Given then
|
||||||
Error_Msg_N ("non-static function call not allowed",
|
Error_Msg_N
|
||||||
N);
|
("non-static function call not allowed", N);
|
||||||
return Skip;
|
return Skip;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
@ -463,10 +462,12 @@ package body Sem_Ch9 is
|
||||||
-- outside the protected subprogram scope.
|
-- outside the protected subprogram scope.
|
||||||
|
|
||||||
if Ekind (Id) in Assignable_Kind
|
if Ekind (Id) in Assignable_Kind
|
||||||
and then not Scope_Within_Or_Same (Scope (Id),
|
and then not
|
||||||
Sub_Id)
|
Scope_Within_Or_Same (Scope (Id), Sub_Id)
|
||||||
and then not Scope_Within_Or_Same (Scope (Id),
|
and then not
|
||||||
Protected_Body_Subprogram (Sub_Id))
|
Scope_Within_Or_Same
|
||||||
|
(Scope (Id),
|
||||||
|
Protected_Body_Subprogram (Sub_Id))
|
||||||
then
|
then
|
||||||
if Lock_Free_Given then
|
if Lock_Free_Given then
|
||||||
Error_Msg_NE
|
Error_Msg_NE
|
||||||
|
|
@ -647,7 +648,6 @@ package body Sem_Ch9 is
|
||||||
and then (not Lock_Free_Given
|
and then (not Lock_Free_Given
|
||||||
or else Errors_Count = Serious_Errors_Detected)
|
or else Errors_Count = Serious_Errors_Detected)
|
||||||
then
|
then
|
||||||
|
|
||||||
-- Establish a relation between the subprogram body and the
|
-- Establish a relation between the subprogram body and the
|
||||||
-- unique protected component it references.
|
-- unique protected component it references.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1712,9 +1712,7 @@ package body Sem_Dim is
|
||||||
-- entity when the object is a constant whose type is a
|
-- entity when the object is a constant whose type is a
|
||||||
-- dimensioned type.
|
-- dimensioned type.
|
||||||
|
|
||||||
if Constant_Present (N)
|
if Constant_Present (N) and then not Exists (Dim_Of_Etyp) then
|
||||||
and then not Exists (Dim_Of_Etyp)
|
|
||||||
then
|
|
||||||
Set_Dimensions (Id, Dim_Of_Expr);
|
Set_Dimensions (Id, Dim_Of_Expr);
|
||||||
|
|
||||||
-- Otherwise, issue an error message
|
-- Otherwise, issue an error message
|
||||||
|
|
|
||||||
|
|
@ -7129,9 +7129,9 @@ package body Sem_Res is
|
||||||
return;
|
return;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
else
|
-- If not overloaded, resolve P with its own type
|
||||||
-- If not overloaded, resolve P with its own type
|
|
||||||
|
|
||||||
|
else
|
||||||
Resolve (P);
|
Resolve (P);
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue