summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-cohama.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-07 16:25:32 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2011-11-07 16:25:32 +0000
commit07f700689b97a0de4cb3a699a3ce8792ea6027d5 (patch)
treeb7d2c8c0616c6ae4c1b17857b182dea8d1352672 /gcc/ada/a-cohama.adb
parent5216baa80511d06d2c52cf413c0c1522e7e899b8 (diff)
downloadppe42-gcc-07f700689b97a0de4cb3a699a3ce8792ea6027d5.tar.gz
ppe42-gcc-07f700689b97a0de4cb3a699a3ce8792ea6027d5.zip
2011-11-07 Yannick Moy <moy@adacore.com>
* sem_util.adb (Note_Possible_Modification): In Alfa mode, generate a reference for a modification even when the modification does not come from source. 2011-11-07 Ed Schonberg <schonberg@adacore.com> * exp_ch5.adb (Expand_Iterator_Loop): For the "of" iterator form, use the indexing attributes rather than the Element function, to obtain variable references. * sem_ch4.adb (Try_Container_Indexing): Code cleanup. Use Find_Aspect rather than iterating over representation items. Improve error message. * a-cohama.adb, a-cohama.ads Update to latest RM, with two versions of Reference functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181093 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cohama.adb')
-rw-r--r--gcc/ada/a-cohama.adb30
1 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ada/a-cohama.adb b/gcc/ada/a-cohama.adb
index 20e10e8daf9..bb729889272 100644
--- a/gcc/ada/a-cohama.adb
+++ b/gcc/ada/a-cohama.adb
@@ -845,14 +845,36 @@ package body Ada.Containers.Hashed_Maps is
-- Reference --
---------------
- function Constant_Reference (Container : Map; Key : Key_Type)
- return Constant_Reference_Type is
+ function Constant_Reference
+ (Container : aliased Map; Position : Cursor)
+ return Constant_Reference_Type
+ is
+ pragma Unreferenced (Container);
+ begin
+ return (Element => Element (Position)'Unrestricted_Access);
+ end Constant_Reference;
+
+ function Reference
+ (Container : aliased in out Map; Position : Cursor)
+ return Reference_Type
+ is
+ pragma Unreferenced (Container);
+ begin
+ return (Element => Element (Position)'Unrestricted_Access);
+ end Reference;
+
+ function Constant_Reference
+ (Container : aliased Map; Key : Key_Type)
+ return Constant_Reference_Type
+ is
begin
return (Element => Container.Element (Key)'Unrestricted_Access);
end Constant_Reference;
- function Reference (Container : Map; Key : Key_Type)
- return Reference_Type is
+ function Reference
+ (Container : aliased in out Map; Key : Key_Type)
+ return Reference_Type
+ is
begin
return (Element => Container.Element (Key)'Unrestricted_Access);
end Reference;
OpenPOWER on IntegriCloud