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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7a3b1c6915ea1273 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.75.170 with SMTP id d10mr2121849pbw.6.1326497550348; Fri, 13 Jan 2012 15:32:30 -0800 (PST) Path: lh20ni179070pbb.0!nntp.google.com!news2.google.com!postnews.google.com!u20g2000yqb.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: How many Ada compiler bugs are here? Date: Fri, 13 Jan 2012 15:30:37 -0800 (PST) Organization: http://groups.google.com Message-ID: <7a8f802e-8d70-4d97-8b85-3f87dafa0899@u20g2000yqb.googlegroups.com> References: <01dd6341-9c3c-4dcb-90f8-6ac66c65eb66@z1g2000vbx.googlegroups.com> <0980607c-df6d-4769-bf6c-288c5666b40f@a11g2000vbz.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1326497550 18496 127.0.0.1 (13 Jan 2012 23:32:30 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Jan 2012 23:32:30 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u20g2000yqb.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-13T15:30:37-08:00 List-Id: On Jan 13, 12:06=A0pm, Blady wrote: > > > > 1. Adjust should not be allowed to be declared (it is a *limited* > > > type). But I have defined it to trace the remaining bugs: > > > There's nothing wrong with defining "Adjust" (you can define any named > > subprogram you want, of course), but (A) "overriding" shouldn't be allo= wed > > on it, and (B) it shouldn't be called automatically if it is defined wi= thout > > "overriding", because it is not special for a limited type. > Hello, > back to point 1), assuming GNAT is used, the private spec of > Ada.Finalization is > =A0 =A0package SFR renames System.Finalization_Root; > =A0 =A0type Controlled is abstract new SFR.Root_Controlled with null > record; > =A0 =A0-- =A0In order to simplify the implementation, the mechanism in > Process_Full_ > =A0 =A0-- =A0View ensures that the full view is limited even though the > parent type > =A0 =A0-- =A0is not. > =A0 =A0type Limited_Controlled is > =A0 =A0 =A0abstract new SFR.Root_Controlled with null record; > and > =A0 =A0type Root_Controlled is tagged null record; > =A0 =A0procedure Adjust =A0 =A0 (Object : in out Root_Controlled); > =A0 =A0procedure Finalize =A0 (Object : in out Root_Controlled); > =A0 =A0procedure Initialize (Object : in out Root_Controlled); > So with GNAT Adjust is part of Limited_Controlled primitives, isn't > it? > > Best, Pascal. Since Limited_Controlled is derived from SFR.Root_Controlled in the *private* part of Ada.Finalization, any primitive operations that get inherited shouldn't be visible to any place that can't see the private part of Ada.Finalization; and therefore this should not affect the legality of anything. Maciej's package says overriding procedure Adjust (...) which is illegal because Adjust isn't supposed to be visible to his package. If GNAT is accepting this, this means that some stuff that should be invisible is visible, and that's a bug. -- Adam