aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-13 21:41:05 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-13 21:41:05 +0200
commite7c9d6b5f6f4a96f69bdd5fac8fc3840aabd56b6 (patch)
treef03de55ae5a11bda43992038eb14f1c081157baa /src
parent2faa22fe95345c6b9555fac60e662ef8469f27f3 (diff)
downloadghdl-e7c9d6b5f6f4a96f69bdd5fac8fc3840aabd56b6.tar.gz
ghdl-e7c9d6b5f6f4a96f69bdd5fac8fc3840aabd56b6.tar.bz2
ghdl-e7c9d6b5f6f4a96f69bdd5fac8fc3840aabd56b6.zip
synth-values: tentatively try to fix warnings. For #1308
Diffstat (limited to 'src')
-rw-r--r--src/synth/synth-values.adb20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/synth/synth-values.adb b/src/synth/synth-values.adb
index e515d6a46..3266f8508 100644
--- a/src/synth/synth-values.adb
+++ b/src/synth/synth-values.adb
@@ -297,18 +297,22 @@ package body Synth.Values is
return Res;
end Unshare;
- type Heap_Index_Ptr is access all Heap_Index;
- function To_Heap_Index_Ptr is
- new Ada.Unchecked_Conversion (Memory_Ptr, Heap_Index_Ptr);
-
- procedure Write_Access (Mem : Memory_Ptr; Val : Heap_Index) is
+ procedure Write_Access (Mem : Memory_Ptr; Val : Heap_Index)
+ is
+ V : Heap_Index;
+ for V'Address use Mem.all'Address;
+ pragma Import (Ada, V);
begin
- To_Heap_Index_Ptr (Mem).all := Val;
+ V := Val;
end Write_Access;
- function Read_Access (Mem : Memory_Ptr) return Heap_Index is
+ function Read_Access (Mem : Memory_Ptr) return Heap_Index
+ is
+ V : Heap_Index;
+ for V'Address use Mem.all'Address;
+ pragma Import (Ada, V);
begin
- return To_Heap_Index_Ptr (Mem).all;
+ return V;
end Read_Access;
function Read_Access (Mt : Memtyp) return Heap_Index is