From: "James S. Rogers" <jimmaureenrogers@worldnet.att.net>
Subject: Re: compiler hangs on circular type dependency
Date: Tue, 21 Jan 2003 05:09:01 GMT
Date: 2003-01-21T05:09:01+00:00 [thread overview]
Message-ID: <NB4X9.5484$zF6.455042@bgtnsc04-news.ops.worldnet.att.net> (raw)
In-Reply-To: 3e2cb563$0$33929$bed64819@news.gradwell.net
"Victor Porton" <porton@ex-code.com> wrote in message
news:3e2cb563$0$33929$bed64819@news.gradwell.net...
> This is sent to report@gnat.com and duplicated in comp.lang.ada
>
> Gnat (both 3.14 and 3.15) hangs on compiling the following
> (erraneous) stuff:
>
> package P is
> type A is tagged null record;
> type B is new A with private;
> type C is new A with private;
> private
> type B is new C with null record;
> type C is new B with null record;
> end P;
>
> BTW, comp.lang.ada, what in Ada Standard deprecated such circularity?
> Isn't it forgotten in the Standard itself?
No, this is clearly covered in the standard:
Section 3.4 paragraph 4 states:
A type shall be completely defined (see 3.11.1) prior to being specified
as the parent type in a derived_type_definition - the
full_type_declarations for the parent type and any of its
subcomponents have to precede the derived_type_definition.
Your private definitions violate this rule.
Jim Rogers
next prev parent reply other threads:[~2003-01-21 5:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-21 2:06 Bug: compiler hangs on circular type dependency Victor Porton
2003-01-21 5:09 ` James S. Rogers [this message]
2003-01-21 6:24 ` tmoran
2003-01-21 7:12 ` Victor Porton
2003-01-21 14:02 ` Wes Groleau
2003-01-21 18:43 ` Victor Porton
2003-01-23 17:12 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox