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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Anonymous Access and Accessibility Levels Date: Wed, 24 Apr 2019 18:21:57 -0500 Organization: JSA Research & Innovation Message-ID: References: <36b410ba-146f-48f4-a759-6ba12072ea0a@googlegroups.com> Injection-Date: Wed, 24 Apr 2019 23:21:58 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="22733"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:56185 Date: 2019-04-24T18:21:57-05:00 List-Id: "Jere" wrote in message news:a45b6efd-28da-46ab-9d5e-d5f3423a8f99@googlegroups.com... > On Wednesday, April 24, 2019 at 6:34:03 AM UTC-4, Jere wrote: >> In either case, I am still interested in understanding those specific >> things I asked earlier. In particular, if the issues I outlined >> in Test_AA_2 and Test_AA2 GNAT bugs or some special case rule that >> I am missing. > > Sorry, meant Test_AA_2 and Test_AA_3 there. I discussed this before, but you might have missed it. There are special rules for discriminants in many different contexts, so there is no "gut feel" that you can use with them. One can only read the rules in detail for each particular case. Generally, it's not worth the effort. I remember (I haven't looked back at your test) that you had some function returns involved. That's one of the special cases, and I'm pretty sure those were legal. In any case, I don't believe that dynamic accessibility checking buys anything at all. Indeed, 98% of my code has to resort to 'Unchecked_Access in order to be compilable at all. I generally wrap the uses in a controlled type that cleans up the accesses as needed (that's how Claw works, for instance). The dynamic checks are mainly a hazard to be avoided rather than anything helpful. (Unlike a static check, it's hard to prove that a dynamic check can't fail, so it remains as a hazard for a future call added in maintenance.) Randy.