From: "Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk>
Subject: Re: [No_Elaboration_Code] GNAT still generating rep_to_pos, why?
Date: Sat, 03 Jan 2004 11:32:32 +0000
Date: 2004-01-03T11:32:32+00:00 [thread overview]
Message-ID: <pan.2004.01.03.11.32.32.644961@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> (raw)
In-Reply-To: 878ykp71fn.fsf@deneb.enyo.de
On Sat, 03 Jan 2004 11:48:28 +0100, Florian Weimer wrote:
> "Luke A. Guest" <laguest@n_o_p_o_r_k_a_n_d_h_a_m.abyss2.demon.co.uk> writes:
>
>> 1) There are two <enum type>_rep_to_pos functions generated but never
>> used.
>
> That's because you have an enumeration type with a non-standard
> representation (see the GNAT source code).
Yes, but I was wondering whether I could tell the compiler not to generate
this code as I'm producing static initialisation here.
>> 2) I have set up my SP_Block record instance to be located at a particular
>> memory address, yet the compiler still generates code to initialise this
>> structure.
>
> pragma Import with convention Ada (or C) should help.
I've already mentioned this in an earlier part of the thread.
This is my code:
type T_SPB is
record
...
end record;
type T_SPB_PTR is access T_SPB;
SP_Block : T_SPB;
for SP_Block'Address use System'To_Address(16#80001000#);
-- Tell the compiler that this record is defined elsewhere.
-- Stops the compiler from producing a warning.
pragma Import(Ada, SP_Block);
The compiler still generates that code.
Luke.
next prev parent reply other threads:[~2004-01-03 11:32 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-02 11:59 [No_Elaboration_Code] GNAT still generating rep_to_pos, why? Luke A. Guest
2004-01-02 17:51 ` Stephen Leake
2004-01-02 18:14 ` Luke A. Guest
2004-01-02 19:31 ` Per Sandberg
2004-01-02 19:46 ` Luke A. Guest
2004-01-02 21:17 ` Stephen Leake
2004-01-02 22:16 ` Luke A. Guest
2004-01-03 1:43 ` Stephen Leake
[not found] ` <87ekuhe5wq.fsf@news.sdbk.de>
2004-01-03 9:58 ` Luke A. Guest
2004-01-03 8:44 ` Luke A. Guest
2004-01-03 1:12 ` Robert I. Eachus
2004-01-03 8:41 ` Luke A. Guest
2004-01-03 11:53 ` Simon Wright
2004-01-03 12:20 ` Luke A. Guest
2004-01-04 12:26 ` Simon Wright
2004-01-03 1:41 ` sk
2004-01-03 2:29 ` Luke A. Guest
2004-01-03 10:48 ` Florian Weimer
2004-01-03 11:32 ` Luke A. Guest [this message]
2004-01-03 13:11 ` Florian Weimer
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox