From: ANH_VO@udlp.com
To: comp.lang.ada@ada.eu.org
Subject: Possible Bug, Need Second Opinion
Date: Sun, 23 Sep 2001 13:01:41 -0500
Date: 2001-09-23T13:01:41-05:00 [thread overview]
Message-ID: <mailman.1001275761.28439.comp.lang.ada@ada.eu.org> (raw)
I am nearly 100% certain that the codes below should compile fine. But, I would
like to have second opinion possibly more before reporting it.
with Interfaces;
package Global is
type Size_T is new Interfaces.Unsigned_32;
end Global;
with Global;
with Interfaces.C.Pointers;
package Index_Rejection is
use Global;
type Data_Array is array (Size_T range <>) of aliased Integer;
package Data_Pointers is
new Interfaces.C.Pointers
(Index => Size_T,
Element => Integer,
Element_Array => Data_Array,
Default_Terminator => 0);
end Index_Rejection;
However, when compiled using GNAT 3.13p on Windows 95, the compiler complains
with an error message of 'index_rejection.ads:14:32: index types of actual do
not match those of formal "Element_Array"'. On the other hand, if Size_T on
lines 8 and 12 is fully qualified as shown below, the compiler was happy.
with Global;
with Interfaces.C.Pointers;
package Index_Rejection is
use Global;
type Data_Array is array (Global.Size_T range <>) of aliased Integer;
package Data_Pointers is
new Interfaces.C.Pointers
(Index => Global.Size_T,
Element => Integer,
Element_Array => Data_Array,
Default_Terminator => 0);
end Index_Rejection;
Am I correct to conclude that there is a bug in the compiler?
Anh Vo
next reply other threads:[~2001-09-23 18:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-23 18:01 ANH_VO [this message]
2001-09-23 21:18 ` Possible Bug, Need Second Opinion Florian Weimer
2001-09-24 13:51 ` Ted Dennison
2001-09-25 18:51 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox