From: Stephen Leake <stephen_leake@acm.org>
To: comp.lang.ada@ada-france.org
Subject: Re: Odd error with access to derived types
Date: 14 Oct 2004 21:28:25 -0400
Date: 2004-10-14T21:28:25-04:00 [thread overview]
Message-ID: <mailman.328.1097803715.390.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: <feusm0hpbe5frsvljam7jbllqvftusc10v@4ax.com>
A.Imran <me5@privacy.net> writes:
> Hello,
>
> I'm getting a very odd error from my compiler (GNAT 3.15p, also tried
> the latest GCC based GNAT).
>
> Would anyone point out why the following is / is not valid ada? TIA.
I get this:
gnatmake -k -g -O0 -gnatf -gnato -gnatwa -gnatwe -gnatwL -gnatVa -I.. test -largs -bargs -E -cargs
gcc -c -I./ -g -O0 -gnatf -gnato -gnatwa -gnatwe -gnatwL -gnatVa -I.. -I- ..\test.adb
test.adb:1:11: warning: unit "b" is not referenced
testp-b.ads:7:10: "b_type" conflicts with declaration at line 6
testp-b.ads:15:10: completion of nonlimited type cannot be limited
you are declaring 'b_type' twice. But perhaps that's not what you
meant. Perhaps you meant "I get an error with the second definition of
b_type". But I'm not going to guess. Please post _exactly_ the code
that generates the error, so we can help.
>
> -- begin testp-b.adb --
> package testp.b is
>
> -- TO FAIL: Comment the next line and leave
> -- the line after that uncommented.
>
> -- XXX 0
Is this the line you want uncommented? I don't think so.
> -- type b_type is new a_type with null record;
> type b_type is new a_type with private;
Did you want both definitions of 'b_type'? I don't think so.
--
-- Stephe
next prev parent reply other threads:[~2004-10-15 1:28 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 [this message]
2004-10-16 0:30 ` A. Imran
2004-10-16 12:58 ` Stephen Leake
2004-10-17 0:19 ` Brian May
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