comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Address representation clause is getting 0
Date: Wed, 31 Dec 2003 15:48:36 -0600
Date: 2003-12-31T15:48:36-06:00	[thread overview]
Message-ID: <vv6h3m13fl4k56@corp.supernews.com> (raw)
In-Reply-To: pan.2003.12.31.13.53.00.912339@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk

"Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> wrote
in message
news:pan.2003.12.31.13.53.00.912339@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.
uk...
> I think that this is an elaboration problem. Now as I don't have a runtime
> or any tools, I need to rely on my own code (think of this as an OS
> kernel).
>
> Does anyone know what I need to do to get this to work?

Ada access objects are initialized to null by default. The object to which
you applied the address clause is thus getting initialized. You have to tell
the compiler not to do that, and the way you do that is to give a pragma
Import. Something like

    pragma Import (SB_Block, Ada);

will suppress the initialization, allowing you to read the data.

As to why you can't read the 'Address itself, I don't know. That looks like
a bug to me.

                 Randy.







  reply	other threads:[~2003-12-31 21:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-31 12:29 Address representation clause is getting 0 Luke A. Guest
2003-12-31 13:53 ` Luke A. Guest
2003-12-31 21:48   ` Randy Brukardt [this message]
2003-12-31 23:03     ` Luke A. Guest
2004-01-01 17:24     ` Luke A. Guest
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox