diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-05-13 21:41:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-05-13 21:41:05 +0200 |
commit | e7c9d6b5f6f4a96f69bdd5fac8fc3840aabd56b6 (patch) | |
tree | f03de55ae5a11bda43992038eb14f1c081157baa /src | |
parent | 2faa22fe95345c6b9555fac60e662ef8469f27f3 (diff) | |
download | ghdl-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.adb | 20 |
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 |