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!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.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: Recommendation of safe subset of Ada to use? Date: Mon, 7 May 2018 19:19:28 -0500 Organization: JSA Research & Innovation Message-ID: References: <9839db28-b6c6-44c9-9d36-336a39c12f25@googlegroups.com> <9a41b8a3-2ac9-4630-8028-2ba165b0fb0b@googlegroups.com> <5eec9be4-03ab-4cbc-8de5-0e9697228ab6@googlegroups.com> <31262263-1919-451d-bacd-663494df19fa@googlegroups.com> <6e66aa5f-9ce0-4f28-ae1b-9bdfeb500a79@googlegroups.com> Injection-Date: Tue, 8 May 2018 00:19:29 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="4867"; 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: reader02.eternal-september.org comp.lang.ada:52081 Date: 2018-05-07T19:19:28-05:00 List-Id: "Brad Moore" wrote in message news:6e66aa5f-9ce0-4f28-ae1b-9bdfeb500a79@googlegroups.com... ... >See 3.10.2 (3.b/3) > >Subclause 3.10.2, home of the accessibility rules, is informally known as >the "Heart of Darkness" amongst the maintainers of Ada. Woe unto all >who enter here (well, at least unto anyone that needs to understand any >of these rules)." > >This is because, probably only a very small handful of people on this >planet >actually truly understand the rules. I am not one of those, though I try my >best, when I need to. And those that do, it is only for a fleeting moment. >It >typically requires a deep dive into the Heart of Darkness. If you reach >enlightenment, consider yourself lucky. ...and you ought to immediately join the ARG to help the rest of us out... ;-) >Randy would be one of the lucky people, but even he will avoid diving into >the Heart of Darkness if he doesn't need to :-) Thanks, I think. ;-) In this particular case, I know the intent because I ended up designing this feature. I was able to explain it to Tucker well enough that he agreed that the rules were right and sufficient. But whether the wording actually says what was meant is hardly known. The intent for explicitly aliased function parameters is that the accessibility check moves to the call. (Note that that doesn't happen for procedures, because there's no return object and no return accessibility.) So that object has to live longer than the function result; the call to Inner in this example doesn't do that and thus it is illegal. Note that examples of this case were included in ACATS test B641002, including one that looks nearly identical to the OP's example. That was issued in March 2014, so it's quite possible for older compilers to not make the check. If a new compiler doesn't make the check, definitely complain to your vendor and tell 'em I sent you. :-) Randy.