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!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Does object renaming allow the view to be a copy? Date: Sun, 22 Jan 2017 21:24:10 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <037bcf19-7753-459e-afa5-773b7ee82246@googlegroups.com> NNTP-Posting-Host: s3c6wwRqkurrfTZpuYYZ+w.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:33124 Date: 2017-01-22T21:24:10+01:00 List-Id: On 2017-01-22 18:37, Simon Wright wrote: > AdaMagica writes: > >> Am Sonntag, 22. Januar 2017 09:27:47 UTC+1 schrieb G.B.: >>> A SO answer (41746244) has given rise to the question of whether >>> or not a compiler implementer may make a renamed object a copy >>> of the original. (Layman's assumptions from LRM 3.1(7), 8.5.1), > > I did suggest that it would have to be a crazy implementer who did this. > >> 3.1(7) ...a renaming_declaration is an example of a declaration that >> does not define a new entity, but instead defines a view of an >> existing entity (see 8.5)... >> >> So how can you think a compiler may create a copy? > > I think that if the object isn't limited and the operations done on it > don't alter its contents you'd be hard put to it to tell the difference, > that's all. > > But like I said, crazy. Under the hood, any sensible person would have a > reference to the original object. Some packed Boolean, not at the storage element margin? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de