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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.36.221.144 with SMTP id t138mr1919351itf.37.1519404976457; Fri, 23 Feb 2018 08:56:16 -0800 (PST) X-Received: by 10.157.1.9 with SMTP id 9mr92583otu.8.1519404976165; Fri, 23 Feb 2018 08:56:16 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feed.usenet.farm!feeder3.feed.usenet.farm!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!o66no838823ita.0!news-out.google.com!s63ni2499itb.0!nntp.google.com!w142no842544ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 23 Feb 2018 08:56:15 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.211.93; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.211.93 References: <15e8a72b-3644-4193-8947-b0aaf587c1c2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: non-local pointer cannot point to local object From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Fri, 23 Feb 2018 16:56:16 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1550 X-Received-Body-CRC: 714079500 Xref: reader02.eternal-september.org comp.lang.ada:50600 Date: 2018-02-23T08:56:15-08:00 List-Id: type POINTER is access all INTEGER; Long: POINTER declare Local: aliased INTEGER := -42; SHORT: POINTEUR := LOCAL'Access; begin Long := LOCAL'Access; end; ...Long is a dangling reference after the "end", but SHORT never becomes one. Why must SHORT := LOCAL'Access be forbidden, can't the compiler see that no assignation to outliving variable can happen ?