From: Simon Wright <simon@pushface.org>
Subject: Re: Memory Access
Date: Tue, 08 Nov 2011 12:44:17 +0000
Date: 2011-11-08T12:44:17+00:00 [thread overview]
Message-ID: <m27h3adbry.fsf@pushface.org> (raw)
In-Reply-To: f5e21e2b-cf06-47f1-9bce-1811a54060d2@c16g2000pre.googlegroups.com
Adam Beneschan <adam@irvine.com> writes:
> On Nov 7, 3:13 pm, Simon Wright <si...@pushface.org> wrote:
>> Adam Beneschan <a...@irvine.com> writes:
>> > declare
>> > Dev_Table : Dev_Table_Type (1 .. Num_Devs_Cnst);
>> > for Dev_Table'Address use Data_Address;
>> > begin
>> > -- and you can use Dev_Table in here
>> > end;
>>
>> One thing to be wary of here is that Dev_Table might contain initialised
>> components.
>>
>> type Integer_P is access all integer;
>> type Rec is record
>> I : Integer_P;
>> end record;
>> R : Rec;
>> for R'Address use ...;
>>
>> may well get R.I initialised to null.
>>
>> I don't know whether it's a GNAT convention, but the way to avoid this
>> in GNAT is to add
>>
>> pragma Import (Ada, R);
>
> Yes, I forgot that; my example above should include pragma Import
> (Ada, Dev_Table). I think this is in the RM. It isn't GNAT-specific.
ARM05 B.1(38) - http://www.adaic.org/resources/add_content/standards/05aarm/html/AA-B-1.html#I7050
next prev parent reply other threads:[~2011-11-08 12:44 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 20:09 Memory Access awdorrin
2011-11-07 21:26 ` Simon Wright
2011-11-07 22:03 ` anon
2011-11-07 22:21 ` Adam Beneschan
2011-11-07 22:42 ` Adam Beneschan
2011-11-07 23:13 ` Simon Wright
2011-11-07 23:32 ` Adam Beneschan
2011-11-08 12:22 ` awdorrin
2011-11-08 16:00 ` Adam Beneschan
2011-11-08 17:46 ` awdorrin
2011-11-08 20:11 ` Adam Beneschan
2011-11-08 20:24 ` awdorrin
2011-11-09 14:42 ` awdorrin
2011-11-08 16:10 ` awdorrin
2011-11-08 18:33 ` Simon Wright
2011-11-08 18:34 ` Simon Wright
2011-11-08 20:18 ` awdorrin
2011-11-08 12:44 ` Simon Wright [this message]
2011-11-07 22:26 ` Niklas Holsti
2011-11-07 22:53 ` Adam Beneschan
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox