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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,814577151c84863d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-17 21:07:56 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!zeus.visi.com!priapus.visi.com!orange.octanews.net!news-out.visi.com!petbe.visi.com!news.octanews.net!in.100proofnews.com!in.100proofnews.com!nx02.iad01.newshosting.com!newshosting.com!sn-xit-03!sn-xit-04!sn-xit-01!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: which compiler is right? Date: Wed, 17 Mar 2004 23:07:34 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <105iblbigdett75@corp.supernews.com> References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:6391 Date: 2004-03-17T23:07:34-06:00 List-Id: "Adam Beneschan" wrote in message news:b4682ab7.0403170927.cc800a5@posting.google.com... ... > Since the score is currently 2-0 that the code should be illegal, > maybe I should point out that not everyone agrees with this analysis, > before you decide it's necessary to fix your code. My belief is that > since the Priority routine declared in Pkg2 is declared in a different > scope than whatever type will be used to instantiate Pkg2, Priority is > neither a primitive subprogram nor is overriding. I think GNAT is > correct to accept the code. I thought that too, but that's not what the language says. Routines can be overriding if they are inherited, anywhere. That's so that a type declared in a body can have overriding routines, even though it can't have primitives. Scopes have absolutely nothing to do with overriding (look at 8.3 again if you don't believe me). Similarly, primitiveness has nothing to do with it. It would be fine for that not to apply in a generic unit, but that is not the current rule (because the primitive routines are inherited in the generic). And this is not an area into which I would likeIn any case, the OP doesn't have any grounds to get Aonix to change ObjectAda. They may decide to do so because he's an important customer or something, but otherwise they would be well advised to wait for the ARG to shake this out. I think it should be illegal simply because it is very confusing. This looks like an overriding routine, but it is not. And if it is not overriding, calls outside of the generic are almost certainly ambigious (for use clause users, anyway). So it isn't very useful. I suppose the overridding keywords will help reduce the confusion some, but only if they're widely used (this routine ought to be tagged "not overriding", which would eliminate the confusion if that was actually intended. But it would still be hard to call the routine.) Randy.