comp.lang.ada
 help / color / mirror / Atom feed
From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Releasing Aliased Variables
Date: Thu, 8 Mar 2001 16:57:13 GMT
Date: 2001-03-08T16:57:13+00:00	[thread overview]
Message-ID: <wccelw8td06.fsf@world.std.com> (raw)
In-Reply-To: 87bsrcs8a3.fsf@deneb.enyo.de

Florian Weimer <fw@deneb.enyo.de> 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



  parent reply	other threads:[~2001-03-08 16:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-07 19:57 Releasing Aliased Variables Byron Kauffman
2001-03-07 20:44 ` tmoran
2001-03-07 21:12 ` Robert A Duff
2001-03-08 13:24   ` Florian Weimer
2001-03-08 14:37     ` Pat Rogers
2001-12-27 12:26       ` Florian Weimer
2001-03-08 14:52     ` Tucker Taft
2001-03-08 16:57     ` Robert A Duff [this message]
2001-03-09 15:08       ` Using COM Interfaces (was: Releasing Aliased Variables) Byron Kauffman
2001-03-09 17:01         ` Robert A Duff
2001-03-09 21:08         ` tmoran
2001-03-12 18:45     ` Releasing Aliased Variables Richard Kenner
2001-03-07 21:31 ` Florian Weimer
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox