* sem_elab.adb: Minor code reorganization (use Nkind_In).
* stringt.adb: Remove temporary pragma Warnings (Off).
* stringt.ads: Add pragma Elaborate_Body to ensure initialization
of Null_String_Id.
2014-02-20 Matthew Heaney <heaney@adacore.com>
* a-chtgbk.adb (Replace): Use correct offset when calculating bucket
index.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207944
138bc75d-0d04-0410-961f-
82ee72b054a4
+2014-02-20 Robert Dewar <dewar@adacore.com>
+
+ * sem_elab.adb: Minor code reorganization (use Nkind_In).
+ * stringt.adb: Remove temporary pragma Warnings (Off).
+ * stringt.ads: Add pragma Elaborate_Body to ensure initialization
+ of Null_String_Id.
+
+2014-02-20 Matthew Heaney <heaney@adacore.com>
+
+ * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
+ index.
+
2014-02-20 Ed Schonberg <schonberg@adacore.com>
* sem_ch5.adb (Analyze_Iterator_Specification): Initialize
-- Per AI05-0022, the container implementation is required to detect
-- element tampering by a generic actual subprogram.
+ -- The following block appears to be vestigial -- this should be done
+ -- using Checked_Index instead. Also, we might have to move the actual
+ -- tampering checks to the top of the subprogram, in order to prevent
+ -- infinite recursion when calling Hash. (This is similar to how Insert
+ -- and Delete are implemented.) This implies that we will have to defer
+ -- the computation of New_Index until after the tampering check. ???
+
declare
B : Natural renames HT.Busy;
L : Natural renames HT.Lock;
B := B + 1;
L := L + 1;
- Old_Indx := Hash (NN (Node)) mod HT.Buckets'Length;
+ Old_Indx := HT.Buckets'First + Hash (NN (Node)) mod HT.Buckets'Length;
B := B - 1;
L := L - 1;
-- then there is nothing to do (we do not know what is being assigned),
-- but otherwise this is an assignment to the prefix.
- if Nkind (N) = N_Indexed_Component
- or else
- Nkind (N) = N_Selected_Component
- or else
- Nkind (N) = N_Slice
+ if Nkind_In (N, N_Indexed_Component,
+ N_Selected_Component,
+ N_Slice)
then
if not Is_Access_Type (Etype (Prefix (N))) then
Check_Elab_Assign (Prefix (N));
-- Setup the null string
-pragma Warnings (Off); -- kill strange warning from code below ???
-
begin
Start_String;
Null_String_Id := End_String;
with Types; use Types;
package Stringt is
+ pragma Elaborate_Body;
+ -- This is to make sure Null_String_Id is properly initialized
-- This package contains routines for handling the strings table which is
-- used to store string constants encountered in the source, and also those