From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8cca2e0315177d3b X-Google-Attributes: gid103376,public From: Jeff Carter Subject: Re: Instantiating a generic formal procedure with an access procedure value Date: 2000/01/12 Message-ID: <85ifd2$bae$1@nnrp1.deja.com>#1/1 X-Deja-AN: 571700366 References: <84guh6$emh$1@nnrp1.deja.com> <3870E3F1.906FDFF4@averstar.com> <84rnbm$8jo$1@nnrp1.deja.com> <38725A42.2961CEFC@averstar.com> <84u97t$uut$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x26.deja.com:80 (Squid/1.1.22) for client 152.163.197.184 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Wed Jan 12 17:59:07 2000 GMT X-MyDeja-Info: XMYDJUIDjrcarter001 Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 95; DigExt; Freei Client 2.1) Date: 2000-01-12T00:00:00+00:00 List-Id: This issue is still unresolved. We know that Tucker Taft's favorite front end accepts this code, but that GNAT 3.11p does not. In cases such as this, I have learned to expect a posting from Robert Dewar pointing out that 3.11 has been replaced by 3.12, often with a statement that 3.12p handles this correctly. However, that has not happened for this. I would like to know how GNAT 3.12 handles this case. It would take over an hour for me to download 3.12p, and I am not able to do so now. I would appreciate hearing from anyone with 3.12 what results it gives on this code. If GNAT 3.12 continues to reject this, which is correct? In article <84u97t$uut$1@nnrp1.deja.com>, Jeff Carter wrote: > In article <38725A42.2961CEFC@averstar.com>, > Tucker Taft wrote: > > Your code compiles fine with My Favorite Front End. > > I'm glad to hear that. > > > > > This looks like a good old compiler bug. On the other hand, > > it would still help if you included the complete source code, > > exactly as it was submitted to GNAT. For example, I am surprised > > GNAT didn't complain about lack of a generic body. > > Here's everything, copied and pasted from the actual files submitted to > GNAT: > > package S_U is > type Handle is limited private; > > procedure Op (Item : in out Handle; Element : in Integer); > > generic -- Iterate > with procedure Action (Element : in out Integer; Continue : out > Boolean); > procedure Iterate (Over : in out Handle); > private -- S_U > type Handle is new Integer; > end S_U; > > package body S_U is > procedure Op (Item : in out Handle; Element : in Integer) is > begin -- Op > null; > end Op; > > procedure Iterate (Over : in out Handle) is > Continue : Boolean; > begin -- Iterate > Action (Element => Integer (Over), Continue => Continue); > end Iterate; > end S_U; > > with S_U; > package S is > type Action_Ptr is access procedure (Element : in out Integer; > Continue : out Boolean); > > protected type Handle is > procedure Op (Element : in Integer); > procedure Iterate (Action : in Action_Ptr); > private -- Handle > Data : S_U.Handle; > end Handle; > end S; > > package body S is > protected body Handle is > procedure Op (Element : in Integer) is > begin -- Op > S_U.Op (Item => Data, Element => Element); > end Op; > > procedure Iterate (Action : in Action_Ptr) is > procedure Local is new S_U.Iterate (Action => Action.all); > begin -- Iterate > Local (Over => Data); > end Iterate; > end Handle; > end S; > > I hope that helps. > > -- > Jeff Carter > "Now go away or I shall taunt you a second time." > -- Monty Python and the Holy Grail > > Sent via Deja.com http://www.deja.com/ > Before you buy. > -- Jeff Carter "Now go away or I shall taunt you a second time." -- Monty Python and the Holy Grail Sent via Deja.com http://www.deja.com/ Before you buy.