From: Brian May <bam@snoopy.apana.org.au>
Subject: Re: Odd error with access to derived types
Date: Sun, 17 Oct 2004 10:19:27 +1000
Date: 2004-10-17T10:19:27+10:00 [thread overview]
Message-ID: <sa4u0sub3hs.fsf@snoopy.apana.org.au> (raw)
In-Reply-To: mailman.1.1097931533.10401.comp.lang.ada@ada-france.org
>>>>> "Stephen" == Stephen Leake <stephen_leake@acm.org> writes:
Stephen> A.Imran <me5@privacy.net> writes:
>> Thank you for looking at the code. Here is the error message:
>>
>> ~> gnatmake test gcc -c test.adb parent-child.ads:10:09:
>> "derived_access" conflicts with declaration at line 6 gnatmake:
>> "test.adb" compilation error
Stephen> That is certainly a confusing error message. I'd call it
Stephen> a compiler bug; submit this to report@gnat.com.
Was the previous code valid? If not, why not?
Stephen> As for working around it, this compiles: package parent
Stephen> is
Another three work arounds I found:
a) move definition of derived_access after derived_type (i.e. make it private).
b) make definition of derived_type public.
It would appear that derived_access needs the full definition of
derived_type in order to work because it contains a task. I don't
understand why.
c) make dummy_task an access type to a_task.
My preference would be c), although you could argue you shouldn't need
to use or manipulate access types here.
gcc-3.4 also has the same problem:
[519] [snoopy:bam] ~/abc >gnatmake test
gcc-3.4 -c test.adb
parent-child.ads:9:09: "derived_access" conflicts with declaration at line 5
gnatmake: "test.adb" compilation error
--
Brian May <bam@snoopy.apana.org.au>
next prev parent reply other threads:[~2004-10-17 0:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <feusm0hpbe5frsvljam7jbllqvftusc10v@4ax.com>
2004-10-14 19:17 ` Odd error with access to derived types Niklas Holsti
2004-10-15 1:28 ` Stephen Leake
2004-10-16 0:30 ` A. Imran
2004-10-16 12:58 ` Stephen Leake
2004-10-17 0:19 ` Brian May [this message]
2004-10-17 0:32 ` Stephen Leake
2004-10-17 12:14 ` A. Imran
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox