* Bug: compiler hangs on circular type dependency
@ 2003-01-21 2:06 Victor Porton
2003-01-21 5:09 ` James S. Rogers
2003-01-21 18:43 ` Victor Porton
0 siblings, 2 replies; 7+ messages in thread
From: Victor Porton @ 2003-01-21 2:06 UTC (permalink / raw)
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?
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 2:06 Bug: compiler hangs on circular type dependency Victor Porton
@ 2003-01-21 5:09 ` James S. Rogers
2003-01-21 6:24 ` tmoran
` (2 more replies)
2003-01-21 18:43 ` Victor Porton
1 sibling, 3 replies; 7+ messages in thread
From: James S. Rogers @ 2003-01-21 5:09 UTC (permalink / raw)
"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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 5:09 ` James S. Rogers
@ 2003-01-21 6:24 ` tmoran
2003-01-21 7:12 ` Victor Porton
2003-01-21 14:02 ` Wes Groleau
2 siblings, 0 replies; 7+ messages in thread
From: tmoran @ 2003-01-21 6:24 UTC (permalink / raw)
> > type B is new A with private;
> > private
> > type B is new C with null record;
>...
> A type shall be completely defined (see 3.11.1) prior to being specified
>...
> Your private definitions violate this rule.
The private definition of B also contradicts the public one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 5:09 ` James S. Rogers
2003-01-21 6:24 ` tmoran
@ 2003-01-21 7:12 ` Victor Porton
2003-01-21 14:02 ` Wes Groleau
2 siblings, 0 replies; 7+ messages in thread
From: Victor Porton @ 2003-01-21 7:12 UTC (permalink / raw)
In article <OI5X9.76286$1q3.11915@sccrnsc01>,
tmoran@acm.org writes:
>> > type B is new A with private;
>> > private
>> > type B is new C with null record;
>>...
>> A type shall be completely defined (see 3.11.1) prior to being specified
>>...
>> Your private definitions violate this rule.
> The private definition of B also contradicts the public one.
No, in private a base type can be replaced to its derivative.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 5:09 ` James S. Rogers
2003-01-21 6:24 ` tmoran
2003-01-21 7:12 ` Victor Porton
@ 2003-01-21 14:02 ` Wes Groleau
2 siblings, 0 replies; 7+ messages in thread
From: Wes Groleau @ 2003-01-21 14:02 UTC (permalink / raw)
>>private
>> type B is new C with null record;
>> type C is new B with null record;
>
> 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.
But it is a GNAT bug to hang. Please send a NON-crossposted
note to report@gnat.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 2:06 Bug: compiler hangs on circular type dependency Victor Porton
2003-01-21 5:09 ` James S. Rogers
@ 2003-01-21 18:43 ` Victor Porton
2003-01-23 17:12 ` Stephen Leake
1 sibling, 1 reply; 7+ messages in thread
From: Victor Porton @ 2003-01-21 18:43 UTC (permalink / raw)
In article <nqcX9.2478$c6.2673@bos-service2.ext.raytheon.com>,
Wes Groleau <wesgroleau@despammed.com> writes:
>
>>>private
>>> type B is new C with null record;
>>> type C is new B with null record;
> >
> But it is a GNAT bug to hang. Please send a NON-crossposted
> note to report@gnat.com
I've already sent there. Well, cross-posted :-)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: compiler hangs on circular type dependency
2003-01-21 18:43 ` Victor Porton
@ 2003-01-23 17:12 ` Stephen Leake
0 siblings, 0 replies; 7+ messages in thread
From: Stephen Leake @ 2003-01-23 17:12 UTC (permalink / raw)
porton@ex-code.com (Victor Porton) writes:
> In article <nqcX9.2478$c6.2673@bos-service2.ext.raytheon.com>,
> Wes Groleau <wesgroleau@despammed.com> writes:
> >
> >>>private
> >>> type B is new C with null record;
> >>> type C is new B with null record;
> > >
> > But it is a GNAT bug to hang. Please send a NON-crossposted
> > note to report@gnat.com
>
> I've already sent there. Well, cross-posted :-)
The point is that report@gnat.com has a filter that rejects
cross-posted emails. Or something like that; they won't see it if it
is crosss-posted.
--
-- Stephe
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2003-01-23 17:12 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-21 2:06 Bug: compiler hangs on circular type dependency Victor Porton
2003-01-21 5:09 ` James S. Rogers
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox