From: howell@COMMUNITY-CHEST.MITRE.ORG
Subject: Access types == Addresses?
Date: 4 May 88 13:33:42 GMT [thread overview]
Message-ID: <8805041333.AA02767@boardwalk.mitre.org> (raw)
Although some Ada compiler vendors store addresses in access types
(pointers in the Bad Old Days...), it seems to be likely that some would
choose to store dope vectors or pointers to dope vectors in an access
type. My question is a survey of existing compilers: on how many is it
true that access types == addresses? The sample pgm below may help answer
the question for a specific compiler. On Verdix, access types ==
System.address. Please let me know what your favorite compiler does; I'll
summarize to the net.
Thanks,
Chuck Howell
The MITRE Corporation, Mail Stop Z645
7525 Colshire Drive, McLean, VA 22102
NET: howell@mitre.arpa or
howell%community-chest.mitre.org@gateway.mitre.org
-------------------------------------------------------------
with Text_Io; use Text_Io;
with System;
with Unchecked_Conversion;
procedure Acctst is
type Ptr is access Integer;
function Addr_To_Ptr is new Unchecked_Conversion (
System.Address, Ptr);
X : Ptr := new Integer'(42);
begin
if X = Addr_To_Ptr(X.all'address) then
Put_Line ("On this compiler, access types == addresses.");
else
Put_Line ("On this compiler, access types DO NOT == addresses.");
end if;
end Acctst;
reply other threads:[~1988-05-04 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox