comp.lang.ada
 help / color / mirror / Atom feed
From: bobduff@world.std.com (Robert A Duff)
Subject: Re: Ada tagged types not as powerful as C++ for dispatching???
Date: 1997/08/18
Date: 1997-08-18T00:00:00+00:00	[thread overview]
Message-ID: <EF38JJ.MF@world.std.com> (raw)
In-Reply-To: 01bcab6a$f2061820$92165da6@csp3610x


In article <01bcab6a$f2061820$92165da6@csp3610x>,
Troy Noble <tmnoble@rmi.net> wrote:
>The only difference between what you tried and what I tried
>is that in my message on this newsgroup I put the definition
>of Circle_Ptr INSIDE package Figures.  In my non-working
>code I had defined Circle_Ptr INSIDE my procedure
>Test_Figures.

That explains it.  You can't convert from a more-nested access type to a
less-nested one, because that could create dangling pointers.  (There
are ways to do it -- e.g. using Unchecked_Access, but it's usually best
to just put the access types at library level.)

>Do you think this is a bug in GNAT that I should report,
>or was it in fact detecting the error properly?

GNAT is correct to complain.

- Bob




      reply	other threads:[~1997-08-18  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-08-15  0:00 Ada tagged types not as powerful as C++ for dispatching??? Troy Noble
1997-08-16  0:00 ` Jon S Anthony
1997-08-18  0:00   ` Troy Noble
1997-08-18  0:00     ` Robert A Duff [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