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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.13.213.211 with SMTP id x202mr8314568ywd.39.1485102399439; Sun, 22 Jan 2017 08:26:39 -0800 (PST) X-Received: by 10.157.41.149 with SMTP id n21mr2148502otb.4.1485102399354; Sun, 22 Jan 2017 08:26:39 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!1.eu.feeder.erje.net!feeder.erje.net!2.us.feeder.erje.net!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder1.iad1.usenetexpress.com!216.166.98.84.MISMATCH!border1.nntp.dca1.giganews.com!nntp.giganews.com!i7no500491qta.1!news-out.google.com!h135ni7163ith.0!nntp.google.com!r185no1430754ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 22 Jan 2017 08:26:39 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=91.55.219.112; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 91.55.219.112 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <037bcf19-7753-459e-afa5-773b7ee82246@googlegroups.com> Subject: Re: Does object renaming allow the view to be a copy? From: AdaMagica Injection-Date: Sun, 22 Jan 2017 16:26:39 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:33121 Date: 2017-01-22T08:26:39-08:00 List-Id: 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), 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? 8.5(3) The elaboration of a renaming_declaration evaluates the name that follows the reserved word renames and thereby determines the view and entity denoted by this name (the renamed view and renamed entity). [A name that denotes the renaming_declaration denotes (a new view of) the renamed entity.] Same here. You get a new view of the entity. BTW: A renaming is not a macro. Thus the following fragment does not change X: X: T renames Y (I); I := I + 1;