-- Disable warnings on possible aliasing problem
function To_Tag is
- new Unchecked_Conversion (Integer_Address, Tag);
+ new Unchecked_Conversion (System.Address, Tag);
+
+ function To_Tag (S : Integer_Address) return Tag is
+ (To_Tag (To_Address (S)));
function To_Dispatch_Table_Ptr is
new Ada.Unchecked_Conversion (Tag, Dispatch_Table_Ptr);
with Ada.Strings.Text_Buffers.Utils;
use Ada.Strings.Text_Buffers;
use Ada.Strings.Text_Buffers.Utils;
-with Ada.Unchecked_Conversion;
+with System.Storage_Elements; use System.Storage_Elements;
package body System.Put_Images is
procedure Put_Image_Pointer
(S : in out Sink'Class; X : Pointer; Type_Kind : String)
is
- function Cast is new Ada.Unchecked_Conversion
- (System.Address, Unsigned_Address);
begin
if X = null then
Put_UTF_8 (S, "null");
else
Put_UTF_8 (S, "(");
Put_UTF_8 (S, Type_Kind);
- Hex.Put_Image (S, Cast (X.all'Address));
+ Hex.Put_Image (S, Unsigned_Address (To_Integer (X.all'Address)));
Put_UTF_8 (S, ")");
end if;
end Put_Image_Pointer;