[gnat] Unjustified error on encountering Ada.Text_IO after Text_IO in multi-source compilation
okellogg@freenet.de
okellogg@freenet.de
Thu Aug 13 18:00:00 GMT 2009
Hello GNAT experts,
Using an updated version of the multi-source compile patch
from
http://gcc.gnu.org/ml/gcc/2009-04/msg00691.html,
Iam encountering the following problem:
-- file: with_text_io.ads
with Text_IO;
package With_Text_IO is
end With_Text_IO;
-- file: with_ada_integer_text_io.ads
with Ada.Integer_Text_IO;
package With_Ada_Integer_Text_IO is
end With_Ada_Integer_Text_IO;
$ gnat1 with_text_io.ads with_ada_integer_text_io.ads
a-inteio.ads:19:10: missing "with Text_Io.Integer_IO;"
compilation abandoned due to previous error
Interestingly, if I switch the order of files,
$ gnat1 with_ada_integer_text_io.ads with_text_io.ads
then compilation proceeds normally and no errors are
produced.
a-inteio.ads looks like this:
-- GNAT comments & copyright ......
with Ada.Text_IO;
package Ada.Integer_Text_IO is
new Ada.Text_IO.Integer_IO (Integer); -- line 19
Myguess is that the Ada.Text_IO which is withed by
a-inteio.ads is
resolved to the node for Text_IO which was created by the
compilation of
with_text_io.ads. This assumes that GNAT internally somehow
equates
Text_IO and Ada.Text_IO. (However, it escapes me why the
problem only
surfaces when the Text_IO node was built first.)
Does anybody have an idea how to fix the Text_IO handling
logic in GNAT
for this case?
Thanks,
Oliver
Heute schon ge"freeMail"t?
Jetzt kostenlose E-Mail-Adresse sichern!
http://email.freenet.de/dienste/emailoffice/produktuebersicht/basic/mail/index.html?pid=6831
More information about the Gcc-help
mailing list