comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@comcast.net>
Subject: Re: Language lawyer question: Equality on 'Access attributes
Date: Fri, 09 Jan 2004 01:16:26 -0500
Date: 2004-01-09T01:16:26-05:00	[thread overview]
Message-ID: <XridndndEa-m2mOiRVn-hQ@comcast.com> (raw)
In-Reply-To: <wcc1xqa1fmj.fsf@shell01.TheWorld.com>

Robert A Duff wrote:

> This is a subtle area, so I could be missing something, but I agree with
> your (Adam's) analysis here.  I think GNAT has a bug.

And I think that GNAT is right, which is why we have the ARG. ;-)  But 
in this case I think this is a low priority AI, and if one is created, I 
would vote for whatever it says just to close the issue.

The technical question is how many "=" operations could apply in this 
case.  My contention was that there are at least two, one associated 
with the 'Access attributes (actually I think there is one for each 
attribute) and one declared by the user.

It is much easier to see why there is an issue if X is on the stack, and 
Y is in a user managed heap, or even just one object at library level, 
and one on the stack.  (That way one value has a nested accessability 
level to be checked, and the other has a static lifetime longer than the 
program.)  You could argue that those pointers can never compare 
equal--and I'd agree.  But the compiler conceptually has two objects of 
different types.  If you want the comparison to occur, you can assign 
one or both to a local access variable, which will "scrub off" the 
access level information.

Yes, the compiler can be smart about this and conclude that if the two 
objects have different accessability levels, they can't compare equal. 
But normally in Ada we prefer to have the compiler tell you there is a 
potential issue rather than have different compilers do different 
things.  (Which is why if this becomes an AI, I will vote back the 
consensus, whatever it is.  It is more important to have a consistent 
language than to "win" language lawyer debates in the ARG. ;-)

-- 
                                           Robert I. Eachus

"The war on terror is a different kind of war, waged capture by capture, 
cell by cell, and victory by victory. Our security is assured by our 
perseverance and by our sure belief in the success of liberty." -- 
George W. Bush




  parent reply	other threads:[~2004-01-09  6:16 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-08  2:05 Language lawyer question: Equality on 'Access attributes Adam Beneschan
2004-01-08  7:47 ` Robert I. Eachus
2004-01-08 11:07   ` Dmitry A. Kazakov
2004-01-08 17:18   ` Adam Beneschan
2004-01-08 18:04     ` Robert A Duff
2004-01-08 18:31       ` Ze Administrator
2004-01-08 21:04         ` Robert A Duff
2004-01-09  4:02           ` Ze Administrator
2004-01-09 23:02             ` Robert A Duff
2004-01-10  2:56               ` Ze Administrator
2004-01-09  4:06           ` Ze Administrator
2004-01-09 23:05             ` Robert A Duff
2004-01-10  3:03               ` Ze Administrator
2004-01-10 13:47                 ` Marin David Condic
2004-01-10  7:19               ` Robert I. Eachus
2004-01-10 19:09                 ` Robert A Duff
2004-01-11 14:27                   ` Robert I. Eachus
2004-01-11 21:42                     ` Ze Administrator
2004-01-12  5:16                       ` Robert I. Eachus
2004-01-09  1:28         ` Adam Beneschan
2004-01-09  4:10           ` Ze Administrator
2004-01-09 11:27             ` Dmitry A. Kazakov
2004-01-09 23:09               ` Robert A Duff
2004-01-10 11:56                 ` Dmitry A. Kazakov
2004-01-10 17:08                   ` Robert I. Eachus
2004-01-10 18:40                   ` Robert A Duff
2004-01-09 23:08             ` Robert A Duff
2004-01-10  7:39               ` Robert I. Eachus
2004-01-08 20:36       ` tmoran
2004-01-08 21:06         ` Robert A Duff
2004-01-09  0:27       ` Randy Brukardt
2004-01-09  1:23       ` Adam Beneschan
2004-01-09  1:38         ` Robert A Duff
2004-01-09  6:16       ` Robert I. Eachus [this message]
2004-01-09 23:27         ` Randy Brukardt
2004-01-10 16:37           ` Robert I. Eachus
     [not found] ` <hmfvc1-f73.ln1@beastie.ix.netcom.com>
     [not found]   ` <l7v1d1-n33.ln1@beastie.ix.netcom.com>
2004-01-09 23:19     ` Robert A Duff
2004-01-09 23:21     ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2004-01-09  5:48 christoph.grein
2004-01-09  6:03 christoph.grein
replies disabled

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