aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/flists.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-06 20:20:52 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-06 20:20:52 +0100
commit1984d2adb083153f03eb7775d956445772ca484f (patch)
tree92939d572fd44940755e30d3963101c0a797f9e7 /src/vhdl/flists.adb
parentf9dd14670a2b17575bc879f82030faaaabdbbea6 (diff)
downloadghdl-1984d2adb083153f03eb7775d956445772ca484f.tar.gz
ghdl-1984d2adb083153f03eb7775d956445772ca484f.tar.bz2
ghdl-1984d2adb083153f03eb7775d956445772ca484f.zip
Use Flist for array indexes.
Diffstat (limited to 'src/vhdl/flists.adb')
-rw-r--r--src/vhdl/flists.adb6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/vhdl/flists.adb b/src/vhdl/flists.adb
index 481dc9bfd..6f14a7c7a 100644
--- a/src/vhdl/flists.adb
+++ b/src/vhdl/flists.adb
@@ -20,7 +20,7 @@ with Tables;
package body Flists is
-- Index of elements.
- type El_Index_Type is new Nat32;
+ type El_Index_Type is new Int32;
-- Describe an flist.
type Entry_Type is record
@@ -137,9 +137,7 @@ package body Flists is
is
E : Entry_Type renames Flistt.Table (Flist);
begin
- if N >= Natural (E.Len) then
- return Null_Node;
- end if;
+ pragma Assert (N < Natural (E.Len));
return Els.Table (E.Els + El_Index_Type (N));
end Get_Nth_Element;