Ada Conformity Assessment Authority      Home Conformity Assessment   Test Suite ARGAda Standard
 
Ada Reference Manual (Ada 2022)Legal Information
Contents   Index   References   Search   Previous   Next 

13.7.2 The Package System.Address_To_Access_Conversions

Static Semantics

1
The following language-defined generic library package exists: 
2/5
generic
   type Object(<>) is limited private;
package System.Address_To_Access_Conversions 
   with Preelaborate, Nonblocking, Global => in out synchronized is
3/3
   type Object_Pointer is access all Object;
   function To_Pointer(Value : Address) return Object_Pointer
      with Convention => Intrinsic;
   function To_Address(Value : Object_Pointer) return Address
      with Convention => Intrinsic;
4/3
end System.Address_To_Access_Conversions;
5/2
The To_Pointer and To_Address subprograms convert back and forth between values of types Object_Pointer and Address. To_Pointer(X'Address) is equal to X'Unchecked_Access for any X that allows Unchecked_Access. To_Pointer(Null_Address) returns null. For other addresses, the behavior is unspecified. To_Address(null) returns Null_Address. To_Address(Y), where Y /= null, returns Y.all'Address. 

Implementation Permissions

6
An implementation may place restrictions on instantiations of Address_To_Access_Conversions. 

Contents   Index   References   Search   Previous   Next 
Ada-Europe Ada 2005 and 2012 Editions sponsored in part by Ada-Europe