* GNAT GPL - Anonymous Access Type
@ 2005-09-27 19:41 Anh Vo
2005-09-28 8:54 ` Georg Bauhaus
` (3 more replies)
0 siblings, 4 replies; 21+ messages in thread
From: Anh Vo @ 2005-09-27 19:41 UTC (permalink / raw)
I got this error message "type declaration cannot refer to itself" when
compiling the record below.
type Node is
record
Value : Integer := 0;
Next : access Node;
end record;
I have the impression that this feature has not been implemented based
on this error. What do you guys think?
AV
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-27 19:41 GNAT GPL - Anonymous Access Type Anh Vo
@ 2005-09-28 8:54 ` Georg Bauhaus
2005-09-28 16:26 ` Anh Vo
2005-09-28 9:55 ` Alex R. Mosteo
` (2 subsequent siblings)
3 siblings, 1 reply; 21+ messages in thread
From: Georg Bauhaus @ 2005-09-28 8:54 UTC (permalink / raw)
Anh Vo wrote:
> I got this error message "type declaration cannot refer to itself" when
> compiling the record below.
>
> type Node is
> record
> Value : Integer := 0;
> Next : access Node;
> end record;
>
> I have the impression that this feature has not been implemented based
> on this error. What do you guys think?
It is supported in GCC 4.1, -gnat05.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-27 19:41 GNAT GPL - Anonymous Access Type Anh Vo
2005-09-28 8:54 ` Georg Bauhaus
@ 2005-09-28 9:55 ` Alex R. Mosteo
2005-09-28 10:49 ` Rob Norris
2005-09-28 18:43 ` Jeffrey R. Carter
3 siblings, 0 replies; 21+ messages in thread
From: Alex R. Mosteo @ 2005-09-28 9:55 UTC (permalink / raw)
Anh Vo wrote:
> I got this error message "type declaration cannot refer to itself" when
> compiling the record below.
>
> type Node is
> record
> Value : Integer := 0;
> Next : access Node;
> end record;
>
> I have the impression that this feature has not been implemented based
> on this error. What do you guys think?
It's partially there (or was in latest GAP release, which is older than
this GPL one). You can use it with types in other packages, for example,
but either I understand something wrong with this feature and the
"limited with" or the support is partial, since I couldn't do anything
useful with these. I ran pretty quickly in some restrictions that
prevented circular referencing.
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-27 19:41 GNAT GPL - Anonymous Access Type Anh Vo
2005-09-28 8:54 ` Georg Bauhaus
2005-09-28 9:55 ` Alex R. Mosteo
@ 2005-09-28 10:49 ` Rob Norris
2005-09-28 10:57 ` Martin Dowie
2005-09-28 18:43 ` Jeffrey R. Carter
3 siblings, 1 reply; 21+ messages in thread
From: Rob Norris @ 2005-09-28 10:49 UTC (permalink / raw)
On 27 Sep 2005 12:41:30 -0700, "Anh Vo" <anhvofrcaus@gmail.com> wrote:
>I got this error message "type declaration cannot refer to itself" when
>compiling the record below.
>
>type Node is
> record
> Value : Integer := 0;
> Next : access Node;
> end record;
>
>I have the impression that this feature has not been implemented based
>on this error. What do you guys think?
>
>AV
I think you need to declare Node first. Eg:
type Node; -- Declaration
type Node_Ptr is access Node;
-- Full definition
type Node is
record
Value : Integer := 0;
Next : Node_Ptr;
end record;
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-27 19:41 GNAT GPL - Anonymous Access Type Anh Vo
` (2 preceding siblings ...)
2005-09-28 10:49 ` Rob Norris
@ 2005-09-28 18:43 ` Jeffrey R. Carter
2005-09-28 19:44 ` Anh Vo
3 siblings, 1 reply; 21+ messages in thread
From: Jeffrey R. Carter @ 2005-09-28 18:43 UTC (permalink / raw)
Anh Vo wrote:
> I got this error message "type declaration cannot refer to itself" when
> compiling the record below.
>
> type Node is
> record
> Value : Integer := 0;
> Next : access Node;
> end record;
>
> I have the impression that this feature has not been implemented based
> on this error. What do you guys think?
Did you use -gnat05?
--
Jeff Carter
"You tiny-brained wipers of other people's bottoms!"
Monty Python & the Holy Grail
18
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-28 18:43 ` Jeffrey R. Carter
@ 2005-09-28 19:44 ` Anh Vo
2005-09-28 20:23 ` Britt Snodgrass
0 siblings, 1 reply; 21+ messages in thread
From: Anh Vo @ 2005-09-28 19:44 UTC (permalink / raw)
You bet I did. By the way, it worked in gcc-4.1 for Red Hat as
suggested by Georg Bauhaus.
AV
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-28 19:44 ` Anh Vo
@ 2005-09-28 20:23 ` Britt Snodgrass
2005-09-28 21:31 ` Simon Wright
0 siblings, 1 reply; 21+ messages in thread
From: Britt Snodgrass @ 2005-09-28 20:23 UTC (permalink / raw)
It works with GNATMAKE Pro 5.04w (20050907-34)
but not with GNATMAKE Pro 5.03a (20050114-34), both tried with -gnat05,
so it looks like a recent addition to GNATPRO.
Britt
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: GNAT GPL - Anonymous Access Type
2005-09-28 20:23 ` Britt Snodgrass
@ 2005-09-28 21:31 ` Simon Wright
2005-09-29 8:36 ` OT: " Martin Dowie
0 siblings, 1 reply; 21+ messages in thread
From: Simon Wright @ 2005-09-28 21:31 UTC (permalink / raw)
"Britt Snodgrass" <britt.snodgrass@gmail.com> writes:
> It works with GNATMAKE Pro 5.04w (20050907-34)
> but not with GNATMAKE Pro 5.03a (20050114-34), both tried with -gnat05,
> so it looks like a recent addition to GNATPRO.
With 4.0.0, I get
grendel:~/cf simon$ gnatgcc -c -gnatc ttt.ads
ttt.ads:5:15: generalized use of anonymous access types is an Ada 2005 extension
ttt.ads:5:15: unit must be compiled with -gnat05 switch
but disappointingly
grendel:~/cf simon$ gnatgcc -c -gnatc -gnat05 ttt.ads
ttt.ads:5:24: type declaration cannot refer to itself
^ permalink raw reply [flat|nested] 21+ messages in thread
* OT: Re: GNAT GPL - Anonymous Access Type
2005-09-28 21:31 ` Simon Wright
@ 2005-09-29 8:36 ` Martin Dowie
2005-09-29 19:02 ` Simon Wright
0 siblings, 1 reply; 21+ messages in thread
From: Martin Dowie @ 2005-09-29 8:36 UTC (permalink / raw)
Simon Wright wrote:
> "Britt Snodgrass" <britt.snodgrass@gmail.com> writes:
>
>> It works with GNATMAKE Pro 5.04w (20050907-34)
>> but not with GNATMAKE Pro 5.03a (20050114-34), both tried with
>> -gnat05, so it looks like a recent addition to GNATPRO.
>
> With 4.0.0, I get
>
> grendel:~/cf simon$ gnatgcc -c -gnatc ttt.ads
> ttt.ads:5:15: generalized use of anonymous access types is an Ada
> 2005 extension ttt.ads:5:15: unit must be compiled with -gnat05 switch
>
> but disappointingly
>
> grendel:~/cf simon$ gnatgcc -c -gnatc -gnat05 ttt.ads
> ttt.ads:5:24: type declaration cannot refer to itself
"grendel" - marillion fan Simon? or is it the anglo-saxon poetry? :-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: OT: Re: GNAT GPL - Anonymous Access Type
2005-09-29 8:36 ` OT: " Martin Dowie
@ 2005-09-29 19:02 ` Simon Wright
2005-09-30 7:57 ` Martin Dowie
0 siblings, 1 reply; 21+ messages in thread
From: Simon Wright @ 2005-09-29 19:02 UTC (permalink / raw)
"Martin Dowie" <martin.dowie@baesystems.com> writes:
> Simon Wright wrote:
>> grendel:~/cf simon$ gnatgcc -c -gnatc -gnat05 ttt.ads
>> ttt.ads:5:24: type declaration cannot refer to itself
>
> "grendel" - marillion fan Simon? or is it the anglo-saxon poetry? :-)
I was running out of dragons' names -- smaug, fafnir, tiamat, orm, ...
(I just checked out fafnir, would you believe www.godchecker.com!!)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: OT: Re: GNAT GPL - Anonymous Access Type
2005-09-29 19:02 ` Simon Wright
@ 2005-09-30 7:57 ` Martin Dowie
2005-09-30 8:11 ` Martin Dowie
0 siblings, 1 reply; 21+ messages in thread
From: Martin Dowie @ 2005-09-30 7:57 UTC (permalink / raw)
Simon Wright wrote:
> "Martin Dowie" <martin.dowie@baesystems.com> writes:
>
>> Simon Wright wrote:
>
>>> grendel:~/cf simon$ gnatgcc -c -gnatc -gnat05 ttt.ads
>>> ttt.ads:5:24: type declaration cannot refer to itself
>>
>> "grendel" - marillion fan Simon? or is it the anglo-saxon poetry? :-)
>
> I was running out of dragons' names -- smaug, fafnir, tiamat, orm, ...
> (I just checked out fafnir, would you believe www.godchecker.com!!)
I'd believe anything on the net these days... ;-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: OT: Re: GNAT GPL - Anonymous Access Type
2005-09-30 7:57 ` Martin Dowie
@ 2005-09-30 8:11 ` Martin Dowie
0 siblings, 0 replies; 21+ messages in thread
From: Martin Dowie @ 2005-09-30 8:11 UTC (permalink / raw)
Martin Dowie wrote:
> Simon Wright wrote:
>> "Martin Dowie" <martin.dowie@baesystems.com> writes:
>>
>>> Simon Wright wrote:
>>
>>>> grendel:~/cf simon$ gnatgcc -c -gnatc -gnat05 ttt.ads
>>>> ttt.ads:5:24: type declaration cannot refer to itself
>>>
>>> "grendel" - marillion fan Simon? or is it the anglo-saxon poetry?
>>> :-)
>>
>> I was running out of dragons' names -- smaug, fafnir, tiamat, orm,
>> ... (I just checked out fafnir, would you believe
>> www.godchecker.com!!)
>
> I'd believe anything on the net these days... ;-)
Like this: http://www.simonkelk.co.uk/sizeofwales.html :-)
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2005-09-30 11:01 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-27 19:41 GNAT GPL - Anonymous Access Type Anh Vo
2005-09-28 8:54 ` Georg Bauhaus
2005-09-28 16:26 ` Anh Vo
2005-09-28 9:55 ` Alex R. Mosteo
2005-09-28 10:49 ` Rob Norris
2005-09-28 10:57 ` Martin Dowie
2005-09-28 16:23 ` Anh Vo
2005-09-29 12:28 ` Rob Norris
2005-09-29 17:31 ` Anh Vo
2005-09-29 18:12 ` Martin Dowie
2005-09-29 20:39 ` Anh Vo
2005-09-30 5:44 ` Martin Dowie
2005-09-30 11:01 ` Martin Dowie
2005-09-28 18:43 ` Jeffrey R. Carter
2005-09-28 19:44 ` Anh Vo
2005-09-28 20:23 ` Britt Snodgrass
2005-09-28 21:31 ` Simon Wright
2005-09-29 8:36 ` OT: " Martin Dowie
2005-09-29 19:02 ` Simon Wright
2005-09-30 7:57 ` Martin Dowie
2005-09-30 8:11 ` Martin Dowie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox