OSDN Git Service

2004-05-17 Steve Kargl <kargls@comcast.net>
[pf3gnuchains/gcc-fork.git] / gcc / ada / 5qsystem.ads
index 4d17cda..c8b9493 100644 (file)
@@ -62,7 +62,7 @@ pragma Pure (System);
 
    --  Storage-related Declarations
 
-   type Address is private;
+   type Address is new Long_Integer;
    Null_Address : constant Address;
 
    Storage_Unit : constant := 8;
@@ -83,6 +83,18 @@ pragma Pure (System);
    pragma Import (Intrinsic, ">=");
    pragma Import (Intrinsic, "=");
 
+   --  Abstract declarations for arithmetic operations on type address.
+   --  These declarations are needed when Address is non-private. They
+   --  avoid excessive visibility of arithmetic operations on address
+   --  which are typically available elsewhere (e.g. Storage_Elements)
+   --  and which would cause excessive ambiguities in application code.
+
+   function "+"   (Left, Right : Address) return Address is abstract;
+   function "-"   (Left, Right : Address) return Address is abstract;
+   function "/"   (Left, Right : Address) return Address is abstract;
+   function "*"   (Left, Right : Address) return Address is abstract;
+   function "mod" (Left, Right : Address) return Address is abstract;
+
    --  Other System-Dependent Declarations
 
    type Bit_Order is (High_Order_First, Low_Order_First);
@@ -101,7 +113,6 @@ pragma Pure (System);
 
 private
 
-   type Address is mod Memory_Size;
    Null_Address : constant Address := 0;
 
    --------------------------------------