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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ce667ecdc314f22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-08 09:00:03 PST Newsgroups: comp.lang.ada Path: supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!feed2.onemain.com!feed1.onemain.com!nntp-out.monmouth.com!newspeer.monmouth.com!nntp.msen.com!uunet!ash.uu.net!world!bobduff From: Robert A Duff Subject: Re: Releasing Aliased Variables Sender: bobduff@world.std.com (Robert A Duff) Message-ID: Date: Thu, 8 Mar 2001 16:57:13 GMT References: <3AA692A8.F1283C27@netscape.net> <87bsrcs8a3.fsf@deneb.enyo.de> Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.3/Emacs 19.34 Xref: supernews.google.com comp.lang.ada:5546 Date: 2001-03-08T16:57:13+00:00 List-Id: Florian Weimer writes: > Some time ago, there was a thread in which someone explained (I think > Robert Dewar) that 'aliased' does not provide any help to the compiler > regarding alias detection, register allocation etc. because the > compiler has to be able to determine this kind of information anyway > if an Address attribute is used. Well, you're "supposed" to use "aliased" if you're going to use 'Address. But of course Ada 83 code doesn't do that, and Ada 95 code only does it if the programmer knows this obscure fact. So in practice, Robert is correct, at least for local variables, where the compiler has a hope of tracking down all references to 'Address. For 'Access, you *must* use aliased. For 'Address, you *should* -- if you don't, the RM says your code might not work. But it will *probably* work in most cases, because compiler writers want Ada 83 code to work in Ada 95! > So in code-generation terms, 'aliased' is a no-op. Not entirely. - Bob