From: Lutz Donnerhacke <lutz@iks-jena.de>
Subject: Re: Errornous String instantiation
Date: Wed, 23 Jul 2003 14:03:29 +0000 (UTC)
Date: 2003-07-23T14:03:29+00:00 [thread overview]
Message-ID: <slrnbht5dc.od.lutz@taranis.iks-jena.de> (raw)
In-Reply-To: slrnbhnguj.oa.lutz@taranis.iks-jena.de
* Lutz Donnerhacke wrote:
> Sorry for posting this problem in such an early stage, but it's a moving
> target where small modifications of the source the problem cause to disappear.
> So I present a short (but not buggy) example of the source skeleton in
> question and show you some results of the real data.
Current workaround:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
package Top is
type Constant_String is access constant String;
type Constant_String_Array is array(Positive range <>) of Constant_String;
end Top;
+ with Top;
+
package Constants is
t1 : aliased constant String := "Test";
t2 : aliased constant String := "A longer test string";
+
+ a : constant Top.Constant_String_Array := (t1'Access, t2'Access);
end Constants;
generic
data : Constant_String_Array;
package Top.Generic_Package is
pragma Elaborate_Body;
end Top.Generic_Package;
with Top.Generic_Package, Constants;
- use Constants;
- package MyPackage is new Top.Generic_Package((t1'Access, t2'Access));
+ package MyPackage is new Top.Generic_Package(Constants.a);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This requires the compiler to instantiate t1 in the scope of Constants for
external use. And this is done correctly.
prev parent reply other threads:[~2003-07-23 14:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-21 10:43 Errornous String instantiation Lutz Donnerhacke
2003-07-21 10:56 ` Preben Randhol
2003-07-21 11:02 ` Lutz Donnerhacke
2003-07-21 11:07 ` Preben Randhol
2003-07-21 12:35 ` Lutz Donnerhacke
2003-07-21 12:55 ` Lutz Donnerhacke
2003-07-21 21:54 ` Adrian Knoth
2003-07-21 11:08 ` Florian Weimer
2003-07-21 11:17 ` Preben Randhol
2003-07-21 16:19 ` Matthew Heaney
2003-07-21 16:26 ` Lutz Donnerhacke
2003-07-23 14:03 ` Lutz Donnerhacke [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox