2 with Unchecked_Conversion
;
3 with System
.Storage_Elements
;
8 (S1
: System
.Address
; S2
: System
.Address
; N
: size_t
)
11 type Pointer
is access all Interfaces
.Unsigned_8
;
13 function To_Pointer
is new Unchecked_Conversion
(System
.Address
, Pointer
);
14 function To_Address
is new Unchecked_Conversion
(Pointer
, System
.Address
);
20 function "+" (Left
: Pointer
; Right
: size_t
) return Pointer
is
21 use System
.Storage_Elements
;
23 return To_Pointer
(To_Address
(Left
) +
24 System
.Storage_Elements
.Storage_Offset
(Right
));
32 procedure Increment
(Ref
: in out Pointer
) is
36 pragma Inline
(Increment
);
38 T
: Pointer
:= To_Pointer
(S1
);
39 S
: Pointer
:= To_Pointer
(S2
);
42 -- if S = null or else T = null then
43 -- raise Dereference_Error;