[multiple changes]
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. From-SVN: r207944
This commit is contained in:
parent
0c7e0c3254
commit
3730c4a046
|
@ -1,3 +1,15 @@
|
||||||
|
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>
|
2014-02-20 Ed Schonberg <schonberg@adacore.com>
|
||||||
|
|
||||||
* sem_ch5.adb (Analyze_Iterator_Specification): Initialize
|
* sem_ch5.adb (Analyze_Iterator_Specification): Initialize
|
||||||
|
|
|
@ -275,6 +275,13 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is
|
||||||
-- Per AI05-0022, the container implementation is required to detect
|
-- Per AI05-0022, the container implementation is required to detect
|
||||||
-- element tampering by a generic actual subprogram.
|
-- 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
|
declare
|
||||||
B : Natural renames HT.Busy;
|
B : Natural renames HT.Busy;
|
||||||
L : Natural renames HT.Lock;
|
L : Natural renames HT.Lock;
|
||||||
|
@ -282,7 +289,7 @@ package body Ada.Containers.Hash_Tables.Generic_Bounded_Keys is
|
||||||
B := B + 1;
|
B := B + 1;
|
||||||
L := L + 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;
|
B := B - 1;
|
||||||
L := L - 1;
|
L := L - 1;
|
||||||
|
|
|
@ -1553,11 +1553,9 @@ package body Sem_Elab is
|
||||||
-- then there is nothing to do (we do not know what is being assigned),
|
-- then there is nothing to do (we do not know what is being assigned),
|
||||||
-- but otherwise this is an assignment to the prefix.
|
-- but otherwise this is an assignment to the prefix.
|
||||||
|
|
||||||
if Nkind (N) = N_Indexed_Component
|
if Nkind_In (N, N_Indexed_Component,
|
||||||
or else
|
N_Selected_Component,
|
||||||
Nkind (N) = N_Selected_Component
|
N_Slice)
|
||||||
or else
|
|
||||||
Nkind (N) = N_Slice
|
|
||||||
then
|
then
|
||||||
if not Is_Access_Type (Etype (Prefix (N))) then
|
if not Is_Access_Type (Etype (Prefix (N))) then
|
||||||
Check_Elab_Assign (Prefix (N));
|
Check_Elab_Assign (Prefix (N));
|
||||||
|
|
|
@ -474,8 +474,6 @@ package body Stringt is
|
||||||
|
|
||||||
-- Setup the null string
|
-- Setup the null string
|
||||||
|
|
||||||
pragma Warnings (Off); -- kill strange warning from code below ???
|
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Start_String;
|
Start_String;
|
||||||
Null_String_Id := End_String;
|
Null_String_Id := End_String;
|
||||||
|
|
|
@ -33,6 +33,8 @@ with System; use System;
|
||||||
with Types; use Types;
|
with Types; use Types;
|
||||||
|
|
||||||
package Stringt is
|
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
|
-- This package contains routines for handling the strings table which is
|
||||||
-- used to store string constants encountered in the source, and also those
|
-- used to store string constants encountered in the source, and also those
|
||||||
|
|
Loading…
Reference in New Issue