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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.65.37 with SMTP id u5mr24888525pbs.5.1431431187309; Tue, 12 May 2015 04:46:27 -0700 (PDT) X-Received: by 10.140.19.196 with SMTP id 62mr190957qgh.13.1431431187036; Tue, 12 May 2015 04:46:27 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!m20no2390492iga.0!news-out.google.com!k20ni2122qgd.0!nntp.google.com!j5no6823415qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 12 May 2015 04:46:26 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.44.154.41; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 108.44.154.41 References: <830c0323-a06c-4884-9214-89f3ee6f17b5@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Incomplete types used with generics From: Jeremiah Injection-Date: Tue, 12 May 2015 11:46:27 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:25837 Date: 2015-05-12T04:46:26-07:00 List-Id: On Monday, May 11, 2015 at 9:43:55 PM UTC-4, Randy Brukardt wrote: > You missed at least 6 months of wrestling with various AdaCore people abo= ut=20 > this feature, specifically over some proposed ACATS tests. (Most of the= =20 > tests showed lovely GNAT bug boxes.) They were trying very hard to find= =20 > reasons that the tests were illegal, because there was an problem with th= e=20 > design of their implementation that made the tests very hard to implement= .=20 > They managed to uncover some language problems that will probably be fixe= d=20 > someday, but in particular, everyone eventually agreed that the test usin= g=20 > limited with (CC51010) is correct (now). I've heard that they've fixed th= e=20 > compiler so that test works, so you'll probably be able to get that to wo= rk=20 > at some future point (but surely not with GNAT GPL 2014, which clearly=20 > predates the fixes). Well that's definitely stinky. Thanks for the info on that. > I suspect that you ran afoul of the fact that the freezing rules differ f= or=20 > tagged incomplete vs. untagged incomplete types, but even if you fixed th= at=20 > you'd still be very likely to run into problems with current GNAT version= s=20 > unless you are a GNAT PRO user and can get a wavefront. I'm definitely a novice at Ada compared to most here, so I will ask: which= freezing rules did I mess up on there with Node2_Type? I am familiar with= how freezing works to some extent (I usually mess it up but am able to tel= l when I can't override a procedure/function or use one as a primitive like= I intended). I was trying hard to not to invoke freezing too early. I di= d the incomplete declaration, the access to it (should be good there?), and= then assuming the compiler could do it (which you indicated it couldn't) I= passed it as an incomplete type to a package instantiation. Is there a be= tter way to do that? =20 Keep in mind my (previously unspecified) goal is to have a type that uses a= smart access type (that's the generic) to reference itself. Basically a n= ode type that uses a smart access type to handle the references (with a wea= k reference to the parent of course). Thanks again!