diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-23 10:19:53 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2012-07-23 10:19:53 +0200 |
commit | 50878404473455327bb16a227beab6a742bcec41 (patch) | |
tree | c423732a807b7aef4ba67bc5ebfea36f4fe50f04 /gcc/ada/a-cihase.adb | |
parent | 473e20df28ec46b084ea6a965ab07c3e4f11288d (diff) | |
download | gcc-50878404473455327bb16a227beab6a742bcec41.zip gcc-50878404473455327bb16a227beab6a742bcec41.tar.gz gcc-50878404473455327bb16a227beab6a742bcec41.tar.bz2 |
[multiple changes]
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* par-ch6.adb (P_Mode): in Ada 2005, a mode indicator can apply
to a formal object of an anonymous access type.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_ch4.adb (Try_Container_Indexing): A user-defined indexing
aspect can have more than one index, e.g. to describe indexing
of a multidimensional object.
2012-07-23 Hristian Kirtchev <kirtchev@adacore.com>
* exp_ch4.adb (Apply_Accessibility_Check): Reimplemented. The check is
now more complex and contains optional finalization part and mandatory
deallocation part.
2012-07-23 Gary Dismukes <dismukes@adacore.com>
* a-cihama.adb, a-cihase.adb, a-cimutr.adb, a-ciorma.adb, a-ciormu.adb,
a-ciorse.adb, a-coinho.adb, a-coinve.adb, a-cidlli.adb: Unsuppress
Accessibility_Check for Element_Type allocators.
2012-07-23 Vasiliy Fofanov <fofanov@adacore.com>
* projects.texi: Fix typo.
2012-07-23 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Resolve_Explicit_Derenference): If prefix is
overloaded, remove those interpretations whose designated type
does not match the context, to avoid spurious ambiguities that
may be caused by the Ada 2012 conversion rule for anonymous
access types.
From-SVN: r189774
Diffstat (limited to 'gcc/ada/a-cihase.adb')
-rw-r--r-- | gcc/ada/a-cihase.adb | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/gcc/ada/a-cihase.adb b/gcc/ada/a-cihase.adb index 7351794..034cfce 100644 --- a/gcc/ada/a-cihase.adb +++ b/gcc/ada/a-cihase.adb @@ -185,6 +185,11 @@ package body Ada.Containers.Indefinite_Hashed_Sets is 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). begin Node.Element := new Element_Type'(Item); Free_Element (X); @@ -807,7 +812,14 @@ package body Ada.Containers.Indefinite_Hashed_Sets is X := Position.Node.Element; - Position.Node.Element := new Element_Type'(New_Item); + 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). + begin + Position.Node.Element := new Element_Type'(New_Item); + end; Free_Element (X); end if; @@ -863,6 +875,11 @@ package body Ada.Containers.Indefinite_Hashed_Sets 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 actual type is class-wide or has access discriminants (see + -- RM 4.8(10.1) and AI12-0035). + Element : Element_Access := new Element_Type'(New_Item); begin return new Node_Type'(Element, Next); @@ -1317,7 +1334,14 @@ package body Ada.Containers.Indefinite_Hashed_Sets is X := Node.Element; - Node.Element := new Element_Type'(New_Item); + 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). + begin + Node.Element := new Element_Type'(New_Item); + end; Free_Element (X); end Replace; |