comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pogner.demon.co.uk>
Subject: Re: Finalization and Self Assignment
Date: 2000/03/04
Date: 2000-03-04T00:00:00+00:00	[thread overview]
Message-ID: <x7vwvnjp2s7.fsf@pogner.demon.co.uk> (raw)
In-Reply-To: ueTu4.52$kE4.1111@client

"Frank J. Lhota" <lhotaf@lexma.meitech.com> writes:

> Fortunately, on many platforms, self assignment is not an issue. Ada RM
> 7.6(19) allows the following implementation permission in regards to the
> assignment of controlled objects:
> 
> - For an assignment_statement that assigns to an object the value of that
> same object, the implementation need not do anything.
> 
> ObjectAda as well as some (all?) versions of GNAT take advantage of this
> permission. I would recommend that this permission be promoted to a
> requirement. In other words, we should require that the compiler NOT do the
> Finalize / Adjust calls when an object is assigned to itself. The issue here
> is not so much efficiency as it is correctness. If we simply eliminate the
> Finalize / Adjust calls from self assignments, these problems go away.

There is, I'm sure, a serious bug in the OA demo compiler (the one
that was given away with various books, in particular John
Barnes'). As far as I can remember it was in exactly this area ..




  parent reply	other threads:[~2000-03-04  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-29  0:00 Finalization and Self Assignment Frank J. Lhota
2000-02-29  0:00 ` Robert A Duff
2000-03-04  0:00 ` Simon Wright [this message]
2000-03-04  0:00 ` Nick Roberts
replies disabled

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